/**
 * Login page — extends registration Atrium shell (.rw-shell.rw-shell--atrium + registration-wizard.css).
 * Scope: .rw-shell.rw-shell--atrium.ul-login-page
 */

/* Card — readable width (column matches registration; card stays compact) */
.rw-shell.rw-shell--atrium.ul-login-page .rw-card--atrium {
    width: 100%;
    max-width: min(460px, 100%);
    margin-left: auto;
    margin-right: auto;
    animation: ulLoginCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ulLoginCardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Brand — matches .rw-resume-heading__icon scale (no pulse) */
.rw-shell.rw-shell--atrium.ul-login-page .ul-login-brand {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--rw-primary-soft, var(--soft-primary)), rgba(255, 255, 255, 0.5));
    color: var(--rw-primary, var(--primary));
    font-size: 1.55rem;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(17, 23, 35, 0.1);
}

/* Email / phone segmented control */
.rw-shell.rw-shell--atrium.ul-login-page .ul-login-type-nav {
    display: flex;
    gap: 0.35rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
    background: var(--rw-bg-subtle, var(--light));
    border-radius: var(--rw-radius-sm, 8px);
    border: 1px solid var(--rw-border, rgba(17, 23, 35, 0.1));
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-type-nav .nav-item {
    flex: 1;
    margin: 0;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-type-nav .nav-link {
    border: none !important;
    border-radius: calc(var(--rw-radius-sm, 8px) - 2px) !important;
    color: var(--rw-text-muted, var(--gray));
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.55rem 0.75rem;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-type-nav button.nav-link {
    display: block;
    width: 100%;
    background: transparent;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-type-nav .nav-link:hover {
    color: var(--rw-text, var(--dark));
    background: rgba(255, 255, 255, 0.7);
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-type-nav .nav-link.active {
    color: var(--rw-primary, var(--primary));
    background: var(--rw-bg, var(--white));
    box-shadow: 0 2px 8px rgba(17, 23, 35, 0.06);
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-type-nav .nav-link:focus {
    outline: 2px solid var(--soft-primary);
    outline-offset: 2px;
}

/* Input groups — joined controls (wizard uses mostly plain .form-control) */
.rw-shell.rw-shell--atrium.ul-login-page .input-group-text {
    background: var(--rw-bg-subtle, var(--light));
    border-color: var(--rw-border, rgba(17, 23, 35, 0.1));
    color: var(--rw-text-muted, var(--gray));
    border-radius: var(--rw-radius-sm, 8px) 0 0 var(--rw-radius-sm, 8px);
}

.rw-shell.rw-shell--atrium.ul-login-page .input-group .form-control {
    border-radius: 0 var(--rw-radius-sm, 8px) var(--rw-radius-sm, 8px) 0;
    border-color: var(--rw-border, rgba(17, 23, 35, 0.1));
    font-size: 0.9375rem;
}

.rw-shell.rw-shell--atrium.ul-login-page .input-group:focus-within .form-control {
    border-color: var(--rw-primary, var(--primary));
}

.rw-shell.rw-shell--atrium.ul-login-page .input-group:focus-within .input-group-text {
    border-color: var(--rw-primary, var(--primary));
    background: var(--soft-primary);
    color: var(--rw-primary, var(--primary));
}

.rw-shell.rw-shell--atrium.ul-login-page .input-group:focus-within {
    box-shadow: 0 0 0 3px var(--soft-primary);
}

.rw-shell.rw-shell--atrium.ul-login-page .input-group .form-control:focus {
    box-shadow: none;
    border-color: var(--rw-primary, var(--primary));
}

.rw-shell.rw-shell--atrium.ul-login-page #togglePassword {
    border-color: var(--rw-border, rgba(17, 23, 35, 0.1));
    border-radius: 0 var(--rw-radius-sm, 8px) var(--rw-radius-sm, 8px) 0;
    color: var(--rw-text-muted, var(--gray));
}

.rw-shell.rw-shell--atrium.ul-login-page #togglePassword:hover {
    background: var(--rw-bg-subtle, var(--light));
    color: var(--rw-text, var(--dark));
}

/* Primary submit — pill + lift (wizard next-btn parity) */
.rw-shell.rw-shell--atrium.ul-login-page .btn-primary.ul-login-submit,
.rw-shell.rw-shell--atrium.ul-login-page .btn-primary#loginButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 148px;
    min-height: 44px;
    padding: 0.6rem 1.65rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.94rem;
    line-height: 1.2;
    box-sizing: border-box;
    border: none !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--hov-primary, var(--primary)) 100%) !important;
    box-shadow: 0 6px 20px -4px var(--soft-primary);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.25s ease, background 0.25s ease;
}

.rw-shell.rw-shell--atrium.ul-login-page .btn-primary.ul-login-submit:hover:not(:disabled),
.rw-shell.rw-shell--atrium.ul-login-page .btn-primary#loginButton:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -6px var(--soft-primary);
    filter: brightness(1.03);
}

.rw-shell.rw-shell--atrium.ul-login-page .btn-primary.ul-login-submit:disabled,
.rw-shell.rw-shell--atrium.ul-login-page .btn-primary#loginButton:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.rw-shell.rw-shell--atrium.ul-login-page .ul-login-divider {
    position: relative;
    text-align: center;
    margin: 1.75rem 0 1.25rem;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--rw-border, rgba(17, 23, 35, 0.1));
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-divider span {
    position: relative;
    display: inline-block;
    padding: 0 0.75rem;
    background: var(--rw-bg, var(--white));
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rw-text-muted, var(--gray));
}

/* Social — Google uses official SVG; others keep icon font */
.rw-shell.rw-shell--atrium.ul-login-page .ul-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-social-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rw-text, var(--dark));
    background: var(--rw-bg, var(--white));
    border: 1px solid var(--rw-border, rgba(17, 23, 35, 0.1));
    border-radius: var(--rw-radius-sm, 8px);
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-social-btn:hover {
    border-color: var(--rw-primary, var(--primary));
    box-shadow: 0 4px 14px rgba(17, 23, 35, 0.08);
    transform: translateY(-1px);
    color: var(--rw-text, var(--dark));
    text-decoration: none;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-social-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-social-btn__icon svg {
    display: block;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-social-btn__icon .lab {
    font-size: 1.25rem;
    line-height: 1;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-social-btn--google .ul-social-btn__icon {
    width: 20px;
    height: 20px;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-footer-cta {
    border-top: 1px solid var(--rw-border, rgba(17, 23, 35, 0.1));
    margin-top: 0.5rem;
    padding-top: 1.25rem;
}

.rw-shell.rw-shell--atrium.ul-login-page .ul-login-demo .alert {
    border-radius: var(--rw-radius-sm, 8px);
    border: 1px solid var(--rw-border, rgba(17, 23, 35, 0.1));
}

@media (max-width: 576px) {
    /* registration-wizard uses negative horizontal margin on .rw-card--atrium; keep login centered */
    .rw-shell.rw-shell--atrium.ul-login-page .rw-card--atrium {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 575.98px) {
    .rw-shell.rw-shell--atrium.ul-login-page .btn-primary.ul-login-submit,
    .rw-shell.rw-shell--atrium.ul-login-page .btn-primary#loginButton {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rw-shell.rw-shell--atrium.ul-login-page .rw-card--atrium {
        animation: none;
    }

    .rw-shell.rw-shell--atrium.ul-login-page .ul-social-btn:hover {
        transform: none;
    }

    .rw-shell.rw-shell--atrium.ul-login-page .btn-primary.ul-login-submit:hover:not(:disabled),
    .rw-shell.rw-shell--atrium.ul-login-page .btn-primary#loginButton:hover:not(:disabled) {
        transform: none;
    }
}
