/* Football Academy — Student/Parent Portal
   Self-contained stylesheet, scoped entirely to --fa-* custom properties
   set by FaPortalController::themeTokensStyle(). No Bootstrap dependency —
   works identically regardless of which theme is active. */

.fa-portal-page, .fa-portal-nav {
    font-family: var(--fa-font, Inter, system-ui, sans-serif);
    color: var(--fa-text, #1e293b);
}

.fa-portal-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Top nav ─────────────────────────────────────────────────────────── */
.fa-portal-nav {
    background: var(--fa-surface, #fff);
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
.fa-portal-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 1.1rem 1.25rem;
}
.fa-portal-brand {
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--fa-primary-dark, #1b5e20);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.fa-portal-nav-links {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap;
}
.fa-portal-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: 0.55rem 1rem;
    border-radius: 50px;
    color: var(--fa-text-muted, #64748b);
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.fa-portal-nav-link:hover {
    background: #f1f8e9;
    color: var(--fa-primary-dark, #1b5e20);
}
.fa-portal-nav-link.active {
    background: var(--fa-primary-light, #e8f5e9);
    color: var(--fa-primary-dark, #1b5e20);
}
.fa-portal-nav-logout {
    color: #d32f2f;
}
.fa-portal-nav-logout:hover {
    background: #ffebee;
    color: #c62828;
}

/* ── Sticky Footer Layout (ensures background fits viewport) ─────────── */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── Page layout ─────────────────────────────────────────────────────── */
.fa-portal-page {
    padding: 3.5rem 0 5rem;
    background: linear-gradient(135deg, #f4fbf0 0%, #eef7e8 100%);
    flex: 1;
}
.fa-portal-title {
    font-size: 1.85rem;
    font-weight: 900;
    margin: 0 0 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.fa-mt-4 { margin-top: 2rem; }
.fa-mb-4 { margin-bottom: 2rem; }
.fa-text-muted { color: var(--fa-text-muted, #64748b); }
.fa-text-center { text-align: center; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.fa-card {
    background: var(--fa-surface, #fff);
    border: none;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}
.fa-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--fa-primary-dark, #1b5e20);
    display: flex;
    align-items: center;
    gap: .6rem;
}
.fa-card-body {
    padding: 1.5rem;
}

/* ── Player cards (dashboard grid) ──────────────────────────────────── */
.fa-portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.fa-player-card {
    display: flex;
    flex-direction: column;
    padding: 1.35rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fa-player-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}
.fa-player-card-top {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.fa-player-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--fa-primary-light, #e8f5e9);
    color: var(--fa-primary-dark, #1b5e20);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.fa-player-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fa-player-card-body h3 {
    margin: 0 0 .4rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--fa-text, #1e293b);
}
.fa-player-card-meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .82rem;
    color: var(--fa-text-muted, #64748b);
    margin-bottom: .5rem;
    flex-wrap: wrap;
}
.fa-player-card-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1.2rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid #f1f5f9;
}
.fa-player-card-links a {
    font-size: .85rem;
    font-weight: 700;
    color: var(--fa-primary, #16a34a);
    text-decoration: none;
    transition: color 0.2s ease;
}
.fa-player-card-links a:hover {
    color: var(--fa-primary-dark, #15803d);
    text-decoration: underline;
}

/* ── Tables ──────────────────────────────────────────────────────────── */
.fa-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}
.fa-table th {
    text-align: left;
    padding: 0.8rem 1rem;
    border-bottom: 2px solid #e8f5e9;
    color: var(--fa-text-muted, #64748b);
    font-weight: 800;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.fa-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--fa-text, #334155);
}
.fa-table tbody tr:last-child td { border-bottom: none; }
.fa-table { overflow-x: auto; display: block; }
.fa-table thead, .fa-table tbody { display: table; width: 100%; table-layout: fixed; }

/* ── Badges ──────────────────────────────────────────────────────────── */
.fa-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fa-badge-success { background: #e8f5e9; color: #1b5e20; }
.fa-badge-danger  { background: #ffebee; color: #c62828; }
.fa-badge-warning { background: #fff8e1; color: #f57f17; }
.fa-badge-muted   { background: #f1f5f9; color: #64748b; }
.fa-nav-badge     { padding: .05rem .45rem; margin-left: .15rem; font-size: .7rem; vertical-align: middle; }

/* ── Alerts ──────────────────────────────────────────────────────────── */
.fa-alert {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-size: .92rem;
    font-weight: 600;
    border: none;
}
.fa-alert-success { background: #e8f5e9; color: #1b5e20; }
.fa-alert-danger  { background: #ffebee; color: #c62828; }
.fa-alert-info    { background: #e3f2fd; color: #0d47a1; }

/* ── Forms ───────────────────────────────────────────────────────────── */
.fa-form-group { margin-bottom: 1.25rem; flex: 1; min-width: 200px; }
.fa-form-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.fa-label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: .45rem; color: var(--fa-text, #1e293b); }
.fa-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    font-size: .92rem;
    font-family: inherit;
    background: #f8fafc;
    color: var(--fa-text, #1e293b);
    transition: border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}
.fa-input:focus {
    outline: none;
    border-color: var(--fa-primary, #16a34a);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(var(--fa-primary-rgb, 22, 163, 74), .12);
}
textarea.fa-input { resize: vertical; }

.fa-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: var(--fa-surface, #fff);
    border: none;
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}
.fa-filter-bar .fa-form-group { margin-bottom: 0; min-width: 160px; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.fa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: .85rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.fa-btn-primary {
    background: var(--fa-primary, #16a34a);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--fa-primary-rgb, 22, 163, 74), 0.15);
}
.fa-btn-primary:hover {
    background: var(--fa-primary-dark, #15803d);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--fa-primary-rgb, 22, 163, 74), 0.25);
}
/* ── Auth pages (login / forgot / reset) ────────────────────────────── */
.fa-portal-auth-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
}

.fa-portal-auth-card {
    width: 100%;
    max-width: 450px;
    background: var(--fa-surface, #fff);
    border: none;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06), 0 5px 15px rgba(0,0,0,0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Image side panel styling */
.fa-portal-auth-side-image {
    display: none;
}

/* Form side panel styling */
.fa-portal-auth-side-form {
    flex: 1;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fa-portal-auth-header {
    text-align: left;
    margin-bottom: 2rem;
}

.fa-portal-badge-pill {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--fa-primary-light, #e8f5e9);
    color: var(--fa-primary-dark, #1b5e20);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 50px;
    margin-bottom: 0.85rem;
}

.fa-portal-auth-header h1 {
    font-size: 1.85rem;
    font-weight: 900;
    margin: 0 0 .5rem;
    color: var(--fa-primary-dark, #1b5e20);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.fa-portal-auth-header p {
    font-size: .9rem;
    color: var(--fa-text-muted, #64748b);
    margin: 0;
    line-height: 1.45;
}

.fa-portal-auth-footer {
    text-align: left;
    margin-top: 1.5rem;
    font-size: .88rem;
    position: relative;
    z-index: 10;
}

.fa-portal-auth-footer a {
    color: var(--fa-primary, #16a34a);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    z-index: 11;
    display: inline-block;
}

.fa-portal-auth-footer a:hover {
    color: var(--fa-primary-dark, #15803d);
    text-decoration: underline;
}

/* Input & button refinements for premium feel */
.fa-form-group .fa-input {
    border: 1px solid #cbd5e1;
    padding: 0.8rem 1.1rem;
    font-size: 0.92rem;
    border-radius: 14px;
    background: #f8fafc;
}

.fa-form-group .fa-input:focus {
    border-color: var(--fa-primary, #16a34a);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(var(--fa-primary-rgb, 22, 163, 74), 0.12);
}

.fa-btn-primary {
    border-radius: 50px;
    padding: 0.85rem 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(var(--fa-primary-rgb, 22, 163, 74), 0.15);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.fa-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--fa-primary-rgb, 22, 163, 74), 0.28);
}

.fa-btn-primary:active {
    transform: translateY(0);
}

/* Responsive layout adjustments */
@media (min-width: 768px) {
    .fa-portal-auth-card {
        max-width: 860px;
        flex-direction: row;
        min-height: 520px;
    }

    .fa-portal-auth-side-image {
        display: flex;
        justify-content: center;
        align-items: flex-end;
        flex: 1.15;
        position: relative;
        background: linear-gradient(135deg, #a5e75c 0%, #4c8a14 100%);
        overflow: hidden;
        padding: 0;
    }

    /* Curved grass hill overlay at the bottom */
    .fa-portal-auth-side-image::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: -10%;
        right: -10%;
        height: 100px;
        background: #5da01b;
        border-radius: 50% 50% 0 0 / 20px 20px 0 0;
        z-index: 2;
    }

    /* Backlight radial glow behind the player */
    .fa-portal-auth-decor-glow {
        position: absolute;
        width: 320px;
        height: 320px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 70%);
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
        pointer-events: none;
    }

    /* The transparent character image */
    .fa-portal-auth-player-img {
        position: relative;
        z-index: 3;
        height: 85%;
        max-height: 420px;
        max-width: 90%;
        object-fit: contain;
        transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
        pointer-events: none;
        filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.12));
    }

    /* Ground shadow under player feet */
    .fa-portal-auth-player-shadow {
        position: absolute;
        bottom: 12px;
        width: 130px;
        height: 10px;
        background: rgba(0, 0, 0, 0.22);
        border-radius: 50%;
        z-index: 2;
        filter: blur(4px);
        transition: transform 0.45s ease, opacity 0.45s ease;
        pointer-events: none;
    }

    /* Hover animations (gaming/lifting effect) */
    .fa-portal-auth-card:hover .fa-portal-auth-player-img {
        transform: translateY(-10px) scale(1.03);
    }

    .fa-portal-auth-card:hover .fa-portal-auth-player-shadow {
        transform: scale(0.8);
        opacity: 0.5;
    }

    .fa-portal-auth-side-form {
        flex: 1;
        padding: 3.5rem 3rem;
    }
}

@media (max-width: 640px) {
    .fa-portal-nav-inner { flex-direction: column; align-items: flex-start; }
    .fa-portal-nav-links { width: 100%; overflow-x: auto; }
    .fa-form-row { flex-direction: column; gap: 0; }
}
