/* =============================================
   EQUIPO LOGIN PAGE STYLES
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* Prevent horizontal drag/overscroll on mobile touch devices */
html,
body {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    max-width: 100%;
}

/* Root cause of the horizontal drag: Bootstrap's `.row` applies -15px side
   margins, but the shared outside footer and the collapsed navbar menu use
   `.row` without a `.container` wrapper, so each row is 30px wider than the
   viewport. `overflow-x: hidden` only clips that visually — the content is
   still wider than the screen, which is what lets touch devices drag the page.
   Neutralise the negative margins here so nothing overflows in the first place. */
header .navbar .row,
footer.footer > .row {
    margin-left: 0;
    margin-right: 0;
}

/* Section wraps the background image */
.login-section {
    background: url("/inc/img/background_landing.jpeg") center / cover no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* navbar is fixed-top at ~72px; push content below it with a visible gap */
    padding: calc(72px + 2rem) 1.5rem 3rem;
    position: relative;
}

/* Subtle light overlay — keeps the football field visible */
.login-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.30);
}

/* Card */
.login-card {
    --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 20px 48px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Alert */
.login-alert {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-ui);
}

.login-alert.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.login-alert.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.login-alert.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.login-alert.alert-light {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

/* Title */
.login-title {
    font-family: var(--font-ui);
    font-size: 1.625rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin: 0 0 1.75rem;
    letter-spacing: -0.02em;
}

/* Inputs */
.login-field {
    position: relative;
    margin-bottom: 0.625rem;
}

.login-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #f3f4f6;
    border: 1.5px solid transparent;
    border-radius: 12px;
    color: #111827;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.login-input::placeholder {
    color: #9ca3af;
}

.login-input:focus {
    background: #ffffff;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Caps lock warning */
.login-warning {
    display: none;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: #b45309;
    margin-top: 0.4rem;
    padding-left: 0.25rem;
}

.login-warning.visible {
    display: flex;
}

/* CTA Button — default: Send Magic Link (Equipo purple) */
.login-cta {
    width: 100%;
    margin-top: 0.875rem;
    padding: 0.9375rem 1.5rem;
    background: #8b5cf6;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
    box-sizing: border-box;
}

.login-cta:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

.login-cta:active {
    transform: translateY(0);
    box-shadow: none;
    background: #6d28d9;
}

/* has-password state: slightly deeper purple */
.login-cta.has-password {
    background: #6d28d9;
}

.login-cta.has-password:hover {
    background: #5b21b6;
}

/* Inline form message (AJAX responses) */
.in_form_msg {
    display: block;
    min-height: 1.25rem;
    font-size: 0.8125rem;
    font-family: var(--font-ui);
    margin-top: 0.5rem;
    text-align: center;
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login-divider span {
    font-size: 0.8125rem;
    font-family: var(--font-ui);
    color: #9ca3af;
    white-space: nowrap;
}

/* Sign up button */
.login-signup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.9375rem 1.5rem;
    background: transparent;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    color: #374151;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    letter-spacing: -0.01em;
    box-sizing: border-box;
}

.login-signup-btn:hover {
    background: #f9fafb;
    border-color: #8b5cf6;
    color: #6d28d9;
    text-decoration: none;
}

/* Forgot password link */
.login-forgot {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-family: var(--font-ui);
    font-size: 0.8125rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-forgot:hover {
    color: #6d28d9;
    text-decoration: none;
}

/* Password dots — default size is too large on iOS; use a smaller font-size.
   Scope to :not(:placeholder-shown) so the smaller font/letter-spacing only
   applies to the masked dots, not the "Password (optional)" placeholder text
   (which would otherwise render with weird wide tracking — EQU-578). */
input[type="password"].login-input:not(:placeholder-shown) {
    font-size: 0.875rem;
    letter-spacing: 0.1em;
}

/* Guarantee the placeholder text always uses normal tracking and the base
   font-size, independent of :placeholder-shown support or render timing.
   The ::placeholder pseudo-element wins for the placeholder regardless of the
   element-level dot styling above, so "Password (optional)" can never inherit
   the wide 0.1em letter-spacing meant only for the masked dots (EQU-578). */
input[type="password"].login-input::placeholder {
    font-size: 1rem;
    letter-spacing: normal;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.375rem;
        border-radius: 16px;
    }

    .login-section {
        padding: calc(72px + 1.5rem) 1rem 2rem;
        align-items: flex-start;
    }
}
