/* Modern Register Page Styles */
:root {
    --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.register_page {
    width: 100%;
    max-width: 1200px;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 2rem auto;
    padding: 0 20px;
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
    border: none;
    transition: transform 0.3s ease;
    overflow: hidden;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    padding: 0;
    display: flex;
    flex-direction: row;
}

.register-side {
    flex: 1;
    padding: 2.5rem;
}

.register-side.left {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.register-side.right {
    background: #fff;
}

.register-welcome {
    margin-bottom: 2rem;
}

.register-welcome h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.register-welcome p {
    font-size: 1.1rem;
    opacity: 0.9;
    color: white;
}

    .form-control select,
select.form-control {
    height: auto !important;
    padding: 8px 12px !important;
    line-height: 1.4 !important;
}

.form-control select option,
select.form-control option {
    padding: 8px 12px;
    line-height: 1.4;
}

h2 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.register-form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-group {
    padding: 0 10px;
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 1.25rem;
}

.form-group.full-width {
    flex: 0 0 100%;
    max-width: 100%;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    height: 48px;
    padding: 0.75rem 1rem;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    transition: all 0.2s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.password-field {
    position: relative;
}

.reveal {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    font-size: 0.9rem;
    z-index: 10;
    background: none;
    border: none;
    padding: 0;
}

.reveal:hover {
    opacity: 1;
}

.btn-primary {
    height: 48px;
    font-weight: 500;
    margin-top: 1rem;
}

.text-danger {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.chat-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

@media (max-width: 991px) {
    .card-body {
        flex-direction: column;
    }

    .register-side.left {
        padding: 3rem 2rem;
    }

    .chat-button {
        position: relative;
        top: 0;
        right: 0;
        margin-bottom: 1.5rem;
    }

    .register-form-row {
        margin: 0;
    }

    .form-group {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
    }
}

/* Two column layout for wider screens */
@media (min-width: 768px) {
    .register-form-row {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -10px;
    }

    .form-group {
        padding: 0 10px;
        flex: 0 0 50%;
        max-width: 50%;
    }

    .form-group.full-width {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.has_account {
    margin-top: 10px;
}

/* Info notice card (registration disabled / moved) */
.info-notice {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    padding: 3rem 2.5rem !important;
}

.info-notice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    font-size: 1.4rem;
}

.info-notice h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #2c3e50;
}

.info-notice p {
    max-width: 340px;
    margin-bottom: 0.75rem;
    color: #6c757d;
    line-height: 1.6;
}

.info-notice-lead {
    color: #2c3e50 !important;
    font-size: 1.05rem;
}

.info-notice .btn {
    width: 100%;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Road strip: doubles as the redirect countdown, car reaches the
   destination dot as the 4s setTimeout in the markup below fires. */
.info-notice-road {
    position: relative;
    width: 100%;
    height: 34px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    background: #f1eefa;
    overflow: hidden;
}

.info-notice-road::before {
    content: "";
    position: absolute;
    left: 0;
    right: 14px;
    top: 50%;
    height: 2px;
    transform: translateY(-50%);
    background-image: repeating-linear-gradient(90deg, #6c757d 0 10px, transparent 0 20px);
    opacity: 0.35;
}

.info-notice-road-flag {
    position: absolute;
    right: 6px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    transform: translateY(-50%);
}

.info-notice-car {
    position: absolute;
    top: 50%;
    left: 2px;
    transform: translate(0, -50%) scaleX(-1);
    animation: infoNoticeDrive 4s linear forwards;
}

.info-notice-car svg {
    display: block;
    width: 30px;
    height: 16px;
}

.info-notice-car path {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.info-notice-car circle {
    fill: #fff;
    stroke: var(--primary);
    stroke-width: 2;
}

@keyframes infoNoticeDrive {
    0%   { left: 2px; }
    82%  { left: calc(100% - 34px); }
    100% { left: calc(100% - 34px); }
}

@media (prefers-reduced-motion: reduce) {
    .info-notice-car {
        animation: none;
        left: calc(50% - 15px);
    }
}

.info-notice .has_account {
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef0f3;
    font-size: 0.9rem;
}

/* Real-time validation helper styles */
.username-helper {
    font-size: 0.85rem;
    color: var(--primary);
    margin-top: 0.25rem;
}

.username-error-msg {
    font-size: 0.85rem;
    line-height: 1.5;
}

.username-suggestion-link {
    cursor: pointer;
    color: var(--primary);
    text-decoration: underline;
    margin: 0 2px;
}

.username-suggestion-link:hover {
    color: var(--secondary);
    text-decoration: none;
}

.password-requirements {
    font-size: 0.85rem;
}

.password-requirements ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.password-requirements li {
    margin-bottom: 0.25rem;
}
