/* District 8 Travel League - MVP Styles */

/* Custom styles for the MVP application */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
}

.jumbotron {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    margin-bottom: 2rem;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.table-sm th,
.table-sm td {
    padding: 0.5rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Login forms */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
}

.login-card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    text-align: center;
    padding: 1.5rem;
}

/* Admin dashboard */
.dashboard-card {
    transition: transform 0.2s;
}

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

.metric-card {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.metric-number {
    font-size: 2rem;
    font-weight: bold;
}

/* Schedule table */
.schedule-table {
    font-size: 0.875rem;
}

.schedule-table th {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
}

/* Standings table */
.standings-table .place-1 {
    background-color: #fff3cd;
    font-weight: bold;
}

.standings-table .place-2 {
    background-color: #f8f9fa;
}

/* Status badges */
.status-active {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

.status-completed {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.status-cancelled {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.status-pending {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.status-approved {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

.status-denied {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

.status-scheduled {
    background-color: #007bff !important;
    color: #ffffff !important;
}

.status-created {
    background-color: #6f42c1 !important;
    color: #ffffff !important;
}

.status-pending-change {
    background-color: #fd7e14 !important;
    color: #ffffff !important;
}

.status-unverified {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.status-team-pending {
    background-color: #fd7e14 !important;
    color: #ffffff !important;
}

.status-team-owner {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

.status-postponed {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.status-default {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    color: #212529 !important;
}

/* Form styles */
.form-label {
    font-weight: 600;
    color: #495057;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .jumbotron {
        padding: 2rem 1rem;
    }
    
    .metric-number {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .card-header,
    footer {
        display: none !important;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
    
    body {
        background-color: white;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 0.375rem;
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.reg-progress .steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reg-progress .step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
}

.reg-progress .step.active {
    color: #0d6efd;
    font-weight: 600;
}

.reg-progress .circle {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 2px solid #adb5bd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.reg-progress .step.active .circle {
    border-color: #0d6efd;
    background: #0d6efd;
    color: #fff;
}

.reg-progress .connector {
    flex: 1 1 auto;
    border-top: 2px solid #dee2e6;
    min-width: 2rem;
}

/* ==========================================================================
   Story 4.4 — Coach Dashboard: Hero + Action Grid
   ========================================================================== */

/* Coach Identity Hero */
.coach-hero {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    padding: 2rem 0;
}

.coach-hero.unassigned {
    background: #6c757d;
}

/* pending state keeps the blue gradient; the amber badge provides the visual cue */

.coach-hero-team {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.25rem 0;
    color: #fff;
}

.coach-name-line,
.coach-hero-meta {
    font-size: 0.875rem;
    opacity: 0.85;
    color: #fff;
}

/* Action Card Grid */
.coach-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: -1.5rem; /* overlap hero bottom edge (UX-DR3) */
    padding-bottom: 2rem;
}

.coach-action-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 1.5rem 1rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.coach-action-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transform: translateY(-3px);
    color: inherit;
    text-decoration: none;
}

.coach-action-card .card-label {
    font-size: 1rem;
    font-weight: 700;
}

.coach-action-card .card-sub {
    font-size: 0.8rem;
}

.coach-action-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin: 0 auto 0.75rem;
}

.coach-action-card.disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

/* Mobile: single-column grid */
@media (max-width: 575px) {
    .coach-action-grid {
        grid-template-columns: 1fr;
        margin-top: -1rem;
    }
}

/* VS Score Entry (score-input.php) */
.vs-score-entry {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.vs-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6c757d;
    text-align: center;
    padding: 0 0.5rem;
}

.vs-score-input {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
    min-height: 44px;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6;
}

/* Migration Cutover — Gap Checklist Rows (UX-DR6) */
.gap-row-covered {
    color: #28a745;
}

.gap-row-missing {
    color: #dc3545;
    background-color: #fff9f9;
}

/* iOS auto-zoom prevention — inputs must be ≥16px so iOS Safari won't zoom on focus */
input, select, textarea {
    font-size: max(16px, 1em);
}

/* Score input overrides the global font-size rule with a more specific selector — intentional */
.vs-score-input {
    font-size: 2rem !important;
}

/* Downsize Bootstrap's lg-select and lg-input on small phones so they don't dominate the screen */
@media (max-width: 575px) {
    .form-select-lg, .form-control-lg {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    /* Score input game info banner: tighten font */
    .score-game-banner {
        font-size: 0.875rem;
    }
}

/* ====================================================
   Mobile-Responsive UI (Story 17.1)
   ==================================================== */

/* Score input: per-team row layout on mobile (≤480px) */
@media (max-width: 480px) {
    .vs-score-entry {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    /* !important required — .vs-score-entry > div { display: flex } below has equal specificity */
    .vs-label { display: none !important; }
    .vs-score-entry > div {
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 10px;
        padding: 0.85rem 1rem;
        margin-bottom: 0.6rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }
    /* Group role label + team name in a left-side column */
    .vs-card-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex: 1;
        min-width: 0;
    }
    .vs-card-text label {
        margin-bottom: 0;
        font-size: 0.95rem;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.2;
    }
    .vs-score-entry .vs-team-label {
        display: block;
    }
    /* !important on all dimensions — form-control sets width:100% at same specificity */
    .vs-score-input {
        width: 70px !important;
        height: 70px !important;
        min-height: 70px;
        font-size: 2rem !important;
        font-weight: 700 !important;
        flex-shrink: 0;
        border: 2px solid #adb5bd !important;
        border-radius: 10px !important;
        background: #f8f9fa !important;
        text-align: center !important;
        padding: 0 !important;
        line-height: 70px !important;
    }
    .vs-score-input:focus {
        border-color: #2563eb !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(37,99,235,0.15) !important;
        outline: none;
    }
}

/* vs-team-label hidden on desktop, shown via media query above */
.vs-team-label { display: none; }

/* Mobile schedule cards (hidden on lg+) */
.mobile-date-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    padding: 0.5rem 0 0.25rem;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0.5rem;
}

.mobile-game-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.mobile-game-card .team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.mobile-game-card .score-or-vs {
    font-weight: 700;
    font-size: 1rem;
    color: #2563eb;
}

.mobile-game-card .game-meta {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.35rem;
}

.mobile-filter-chips {
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-filter-chips::-webkit-scrollbar { display: none; }

.mobile-game-card.is-filtered-out {
    display: none !important;
}

.date-group.is-empty {
    display: none !important;
}

.chip-btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    border: 1.5px solid #2563eb;
    background: #fff;
    color: #2563eb;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.chip-btn.active,
.chip-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* Coach hero stat tiles */
.hero-stats {
    flex-wrap: wrap;
}

.hero-stat {
    flex: 1 1 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    text-align: center;
    min-width: 60px;
}

.hero-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.hero-stat-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.75);
    margin-top: 0.1rem;
}

a.hero-stat {
    text-decoration: none;
    cursor: pointer;
}

a.hero-stat:hover {
    background: rgba(255,255,255,0.25);
    text-decoration: none;
}

.hero-stat-alert {
    background: rgba(255, 193, 7, 0.3);
    border: 1px solid rgba(255, 193, 7, 0.55);
}

a.hero-stat.hero-stat-alert:hover {
    background: rgba(255, 193, 7, 0.45);
}

/* Contact cards (mobile) */
.contact-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.contact-card .contact-team {
    font-weight: 700;
    font-size: 0.95rem;
}

.contact-card .contact-manager {
    font-size: 0.82rem;
    color: #6c757d;
    margin-top: 0.1rem;
}

.contact-card .contact-links {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.contact-card .contact-links a {
    font-size: 0.875rem;
    text-decoration: none;
}

/* Collapse chevron rotation */
.collapse-chevron {
    transition: transform 0.2s ease;
}

[aria-expanded="false"] .collapse-chevron {
    transform: rotate(-90deg);
}

/* Standings mobile expandable cards */
.standings-card {
    border: 1px solid #dee2e6;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.standings-card-first {
    border-color: #f59e0b;
    background: #fffbeb;
}

.standings-card-header {
    width: 100%;
    background: none;
    border: none;
    padding: 0.7rem 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: left;
    cursor: pointer;
}

.standings-card-place {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    flex-shrink: 0;
    min-width: 2rem;
}

.standings-card-first .standings-card-place {
    color: #b45309;
}

.standings-card-team {
    font-size: 0.9rem;
    font-weight: 700;
    color: #212529;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.standings-card-record {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6c757d;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.standings-chevron {
    font-size: 0.7rem;
    color: #adb5bd;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.standings-card-header[aria-expanded="true"] .standings-chevron {
    transform: rotate(180deg);
}

.standings-card-detail {
    padding: 0.5rem 0.9rem 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.standings-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    padding: 0.2rem 0;
    color: #495057;
}

.standings-detail-row span:first-child {
    color: #6c757d;
}

.standings-detail-row span:last-child {
    font-weight: 600;
}
