/**
 * Login Page Styles
 * File: /wp-content/themes/wrestlerfinder/assets/css/login.css
 *
 * Standalone split-column layout for /login/. Dark mode default.
 * Mobile first — single column at <=767px, two-column grid at 768+.
 * Design tokens from design-system.css only — no hardcoded values.
 *
 * @package WrestlerFinder
 */

/* =============================================================================
   Page body
============================================================================= */

.wf-login-page {
    background: var(--color-bg);
    color:      var(--color-text);
    min-height: 100vh;
}

/* =============================================================================
   Layout — CSS grid split. Mobile is one column, desktop is 1fr 1fr.
============================================================================= */

.wf-login {
    display:               grid;
    grid-template-columns: 1fr;
    min-height:            100vh;
}

@media ( min-width: 768px ) {
    .wf-login {
        grid-template-columns: 1fr 1fr;
    }
}

/* =============================================================================
   Left panel — value prop
   Teal-tinted background, logo top, headline + benefits centered vertically.
   On mobile collapses to a slim header: logo + tagline, full value body hidden.
============================================================================= */

.wf-login__value {
    display:         flex;
    flex-direction:  column;
    gap:             var(--space-6);
    padding:         var(--space-6) var(--space-5);
    background:      var(--color-teal-dim);
    /* Subtle radial texture hint — a single large soft glow at top-left.
       If you later drop a real wrestling photo at assets/images/login-bg.jpg,
       replace this whole block with:
           background-image:
               linear-gradient(135deg, var(--color-teal-dim) 0%, rgba(13,17,23,0.75) 100%),
               url('../images/login-bg.jpg');
           background-size: cover;
           background-position: center;
       The linear-gradient overlay keeps the text + benefits readable on
       top of any photograph. */
    background-image:
        radial-gradient(
            circle at 20% 15%,
            var(--color-teal-glow) 0%,
            transparent 55%
        );
    background-repeat: no-repeat;
}

@media ( min-width: 768px ) {
    .wf-login__value {
        gap:     var(--space-10);
        padding: var(--space-12);
        /* Vertically center the whole content block (logo + headline +
           benefits) as a single group. Using `center` instead of
           `space-between` means on a tall viewport there's matching
           breathing room above the logo and below the benefits —
           the layout reads as intentionally centered rather than
           pinned to opposite edges. */
        justify-content: center;
    }
}

/* Logo at top of panel */
.wf-login__logo {
    display:         inline-flex;
    align-items:     center;
    text-decoration: none;
    flex-shrink:     0;
    width:           fit-content;
}

.wf-login__logo img {
    height: 40px;
    width:  auto;
    display: block;
}

.wf-login__logo-text {
    font-family:    var(--font-heading);
    font-size:      var(--text-2xl);
    font-weight:    800;
    color:          var(--color-text);
    letter-spacing: -0.01em;
}

.wf-login__logo-text--sm {
    font-size: var(--text-lg);
}

[data-theme="light"] .wf-login__logo img,
[data-theme="light"] .wf-login__card-logo img {
    /* Same teal tint other page templates use for the logo in light mode */
    filter: brightness(0.3) sepia(1) hue-rotate(150deg) saturate(4);
}

/* Value body — hidden on mobile (tagline takes over), visible on desktop */
.wf-login__value-body {
    display: none;
}

@media ( min-width: 768px ) {
    .wf-login__value-body {
        display:        flex;
        flex-direction: column;
        gap:            var(--space-6);
    }
}

/* Mobile tagline — replaces the full value body at <=767px */
.wf-login__tagline {
    font-family:    var(--font-heading);
    font-size:      var(--text-lg);
    font-weight:    700;
    color:          var(--color-text);
    margin:         0;
    line-height:    1.3;
    letter-spacing: 0.01em;
}

@media ( min-width: 768px ) {
    .wf-login__tagline {
        display: none;
    }
}

.wf-login__headline {
    font-family:    var(--font-heading);
    font-size:      var(--text-4xl);
    font-weight:    800;
    line-height:    1.1;
    color:          var(--color-text);
    margin:         0;
    letter-spacing: 0.01em;
}

@media ( min-width: 1024px ) {
    .wf-login__headline {
        font-size: var(--text-5xl);
    }
}

.wf-login__benefits {
    list-style:     none;
    padding:        0;
    margin:         0;
    display:        flex;
    flex-direction: column;
    gap:            var(--space-4);
}

.wf-login__benefits li {
    display:     flex;
    align-items: flex-start;
    gap:         var(--space-3);
    font-size:   var(--text-base);
    color:       var(--color-text);
    line-height: 1.5;
}

.wf-login__benefit-icon {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           28px;
    height:          28px;
    flex-shrink:     0;
    border-radius:   var(--radius-full);
    background:      var(--color-teal);
    color:           var(--color-bg);
}

/* =============================================================================
   Right panel — form column
   Surface background, card centered within the column.
============================================================================= */

.wf-login__form-col {
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         var(--space-6) var(--space-5);
    background:      var(--color-bg);
}

@media ( min-width: 768px ) {
    .wf-login__form-col {
        padding: var(--space-12);
    }
}

.wf-login__card {
    width:         100%;
    max-width:     420px;
    background:    var(--color-surface);
    border:        1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding:       var(--space-8) var(--space-6);
    box-shadow:    var(--shadow-card);
}

@media ( min-width: 768px ) {
    .wf-login__card {
        padding: var(--space-10) var(--space-8);
    }
}

/* Wordmark row at top of card */
.wf-login__card-logo {
    display:      flex;
    align-items:  center;
    justify-content: flex-start;
    margin-bottom: var(--space-6);
    opacity:      0.85;
}

.wf-login__card-logo img {
    width: auto;
}

.wf-login__heading {
    font-family:    var(--font-heading);
    font-size:      var(--text-3xl);
    font-weight:    800;
    color:          var(--color-text);
    margin:         0 0 var(--space-2);
    line-height:    1.1;
    letter-spacing: 0.01em;
}

/* One-time success banner shown above the login form after a password
   reset (?reset=1). Teal-tinted pill, icon + message inline. */
.wf-login__success-banner {
    display:       flex;
    align-items:   center;
    gap:           var(--space-2);
    padding:       var(--space-3) var(--space-4);
    margin-bottom: var(--space-5);
    background:    var(--color-teal-dim);
    border:        1px solid var(--color-teal-border);
    border-radius: var(--radius-md);
    color:         var(--color-teal);
    font-size:     var(--text-sm);
    font-weight:   600;
    line-height:   1.4;
}

.wf-login__success-banner svg {
    flex-shrink: 0;
}

/* Big checkmark icon for the forgot-password "Check your email"
   confirmation state. Circular teal pill, centered above the heading. */
.wf-login__success-icon {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           64px;
    height:          64px;
    margin:          0 auto var(--space-5);
    border-radius:   var(--radius-full);
    background:      var(--color-teal-dim);
    color:           var(--color-teal);
    border:          2px solid var(--color-teal-border);
}

.wf-login__sub {
    font-size:   var(--text-sm);
    color:       var(--color-text-muted);
    margin:      0 0 var(--space-6);
    line-height: 1.5;
}

/* =============================================================================
   Form
============================================================================= */

.wf-login-form {
    display:        flex;
    flex-direction: column;
    gap:            var(--space-4);
}

.wf-login-form__field {
    display:        flex;
    flex-direction: column;
    gap:            var(--space-2);
}

.wf-login-form__label {
    font-size:   var(--text-sm);
    font-weight: 600;
    color:       var(--color-text);
}

.wf-login-form__input {
    width:         100%;
    padding:       var(--space-3) var(--space-4);
    background:    var(--color-surface-2);
    border:        1px solid var(--color-border);
    border-radius: var(--radius-md);
    color:         var(--color-text);
    font-size:     var(--text-base);
    font-family:   var(--font-body);
    min-height:    48px;
    transition:    border-color var(--transition-fast),
                   box-shadow var(--transition-fast);
}

.wf-login-form__input:focus {
    outline:      none;
    border-color: var(--color-primary);
    box-shadow:   0 0 0 3px var(--color-teal-dim);
}

.wf-login-form__input::placeholder {
    color: var(--color-text-subtle);
}

/* Password wrapper — input + show/hide toggle button.
   Toggle sits absolutely positioned on the right so it doesn't affect
   the input's width. Right padding on the input reserves space. */
.wf-login-form__password-wrap {
    position: relative;
}

.wf-login-form__input--password {
    padding-right: 52px;
}

.wf-login-form__password-toggle {
    position:        absolute;
    top:             50%;
    right:           var(--space-2);
    transform:       translateY(-50%);
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           36px;
    height:          36px;
    padding:         0;
    background:      transparent;
    border:          none;
    border-radius:   var(--radius-md);
    color:           var(--color-text-muted);
    cursor:          pointer;
    transition:      color var(--transition-fast),
                     background var(--transition-fast);
}

.wf-login-form__password-toggle:hover,
.wf-login-form__password-toggle:focus-visible {
    color:      var(--color-text);
    background: var(--color-surface-3);
    outline:    none;
}

/* Inline error beneath the form fields */
.wf-login-form__error {
    font-size:     var(--text-sm);
    color:         var(--color-error);
    padding:       var(--space-3) var(--space-4);
    background:    rgba(255, 77, 106, 0.08);
    border:        1px solid rgba(255, 77, 106, 0.20);
    border-radius: var(--radius-md);
    line-height:   1.4;
}

.wf-login-form__error[hidden] {
    display: none;
}

.wf-login-form__submit {
    width:      100%;
    min-height: 48px;
    margin-top: var(--space-2);
    font-size:  var(--text-base);
}

.wf-login-form__submit[disabled] {
    opacity:        0.7;
    cursor:         default;
    pointer-events: none;
}

.wf-login-form__forgot {
    text-align: center;
    margin:     var(--space-3) 0 0;
    font-size:  var(--text-sm);
}

.wf-login-form__forgot a {
    color:           var(--color-text-muted);
    text-decoration: none;
    border-bottom:   1px solid transparent;
    transition:      color var(--transition-fast),
                     border-color var(--transition-fast);
}

.wf-login-form__forgot a:hover {
    color:        var(--color-primary);
    border-color: var(--color-primary);
}

.wf-login-form__signup {
    margin:     var(--space-6) 0 0;
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border-subtle);
    text-align: center;
    font-size:  var(--text-sm);
    color:      var(--color-text-muted);
}

.wf-login-form__signup a {
    color:           var(--color-primary);
    font-weight:     600;
    text-decoration: none;
    margin-left:     var(--space-1);
}

.wf-login-form__signup a:hover {
    text-decoration: underline;
}
