/**
 * FoHi Steelers Core - Public Styles
 *
 * Mobile-first responsive design.
 * Primary color: #800000 (maroon)
 *
 * @package FoHi_Steelers_Core
 * @since   1.0.0
 */

/* ================================================================== */
/*  CSS Custom Properties                                              */
/* ================================================================== */

:root {
    --fohi-maroon: #800000;
    --fohi-maroon-dark: #5c0000;
    --fohi-gold: #cfb53b;
    --fohi-white: #ffffff;
    --fohi-gray-100: #f7f7f7;
    --fohi-gray-200: #eeeeee;
    --fohi-gray-300: #dddddd;
    --fohi-gray-500: #888888;
    --fohi-gray-700: #444444;
    --fohi-gray-900: #1a1a1a;
    --fohi-red: #dc3545;
    --fohi-green: #28a745;
    --fohi-blue: #0073aa;
    --fohi-yellow: #ffc107;
    --fohi-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --fohi-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --fohi-radius: 6px;
    --fohi-transition: 0.25s ease;
}

/* ================================================================== */
/*  Emergency Banner                                                   */
/* ================================================================== */

.fohi-emergency-banner {
    padding: 14px 20px;
    text-align: center;
    font-weight: 600;
    position: relative;
    z-index: 999;
}

.fohi-emergency-banner.fohi-banner-warning {
    background: var(--fohi-yellow);
    color: var(--fohi-gray-900);
}

.fohi-emergency-banner.fohi-banner-danger {
    background: var(--fohi-red);
    color: var(--fohi-white);
}

.fohi-emergency-banner.fohi-banner-info {
    background: var(--fohi-blue);
    color: var(--fohi-white);
}

.fohi-emergency-banner .fohi-banner-dismiss {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    color: inherit;
    line-height: 1;
    padding: 4px 8px;
}

.fohi-emergency-banner .fohi-banner-dismiss:hover {
    opacity: 1;
}

/* ================================================================== */
/*  Countdown Timer                                                    */
/* ================================================================== */

.fohi-countdown {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 12px 0;
}

.fohi-countdown-unit {
    text-align: center;
    min-width: 56px;
}

.fohi-countdown-digit {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    color: var(--fohi-maroon);
}

.fohi-countdown-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--fohi-gray-500);
    margin-top: 4px;
}

.fohi-countdown-expired {
    font-weight: 700;
    color: var(--fohi-maroon);
    font-size: 18px;
}

/* ================================================================== */
/*  Scoreboard Cards                                                   */
/* ================================================================== */

.fohi-scoreboard-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 16px;
}

.fohi-scoreboard-header {
    text-align: center;
    margin-bottom: 24px;
}

.fohi-season-summary {
    text-align: center;
    margin-bottom: 32px;
}

.fohi-record-display {
    font-size: 48px;
    font-weight: 800;
    color: var(--fohi-maroon);
    margin: 8px 0;
}

.fohi-scoreboard-games {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fohi-game-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--fohi-white);
    border: 1px solid var(--fohi-gray-300);
    border-radius: var(--fohi-radius);
    padding: 16px;
    box-shadow: var(--fohi-shadow);
    transition: box-shadow var(--fohi-transition);
}

.fohi-game-card:hover {
    box-shadow: var(--fohi-shadow-hover);
}

.fohi-game-card.fohi-result-win {
    border-left: 4px solid var(--fohi-green);
}

.fohi-game-card.fohi-result-loss {
    border-left: 4px solid var(--fohi-red);
}

.fohi-game-card.fohi-result-tie {
    border-left: 4px solid var(--fohi-gray-500);
}

.fohi-game-card-date {
    text-align: center;
    min-width: 48px;
    flex-shrink: 0;
}

.fohi-game-card-date .fohi-game-month {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--fohi-gray-500);
}

.fohi-game-card-date .fohi-game-day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--fohi-gray-900);
}

.fohi-game-card-details {
    flex: 1;
    min-width: 0;
}

.fohi-game-card-details .fohi-game-opponent {
    display: block;
    font-weight: 600;
    font-size: 16px;
}

.fohi-game-card-details .fohi-game-location,
.fohi-game-card-details .fohi-game-time {
    display: block;
    font-size: 13px;
    color: var(--fohi-gray-500);
}

.fohi-game-card-score {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.fohi-score {
    font-size: 28px;
    font-weight: 800;
}

.fohi-score-separator {
    font-size: 20px;
    color: var(--fohi-gray-500);
}

.fohi-result-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    color: var(--fohi-white);
    margin-left: 8px;
}

.fohi-result-badge.fohi-result-win {
    background: var(--fohi-green);
}

.fohi-result-badge.fohi-result-loss {
    background: var(--fohi-red);
}

.fohi-result-badge.fohi-result-tie {
    background: var(--fohi-gray-500);
}

.fohi-game-upcoming {
    font-size: 13px;
    color: var(--fohi-gray-500);
    font-style: italic;
}

/* ================================================================== */
/*  Filter Bar                                                         */
/* ================================================================== */

.fohi-filter-bar {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0;
}

.fohi-filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--fohi-maroon);
    border-radius: var(--fohi-radius);
    background: transparent;
    color: var(--fohi-maroon);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--fohi-transition);
    font-size: 14px;
}

.fohi-filter-btn:hover,
.fohi-filter-btn.active {
    background: var(--fohi-maroon);
    color: var(--fohi-white);
}

/* ================================================================== */
/*  Schedule Table                                                     */
/* ================================================================== */

.fohi-schedule-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 16px;
}

.fohi-schedule-header {
    text-align: center;
    margin-bottom: 24px;
}

.fohi-schedule-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fohi-schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--fohi-white);
    border-radius: var(--fohi-radius);
    overflow: hidden;
    box-shadow: var(--fohi-shadow);
}

.fohi-schedule-table thead {
    background: var(--fohi-maroon);
    color: var(--fohi-white);
}

.fohi-schedule-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fohi-schedule-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--fohi-gray-200);
    font-size: 14px;
}

.fohi-schedule-table tbody tr:nth-child(even) {
    background: var(--fohi-gray-100);
}

.fohi-schedule-table tbody tr:hover {
    background: #fdf0f0;
}

/* Badges */
.fohi-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fohi-badge-home {
    background: var(--fohi-maroon);
    color: var(--fohi-white);
}

.fohi-badge-away {
    background: var(--fohi-gray-700);
    color: var(--fohi-white);
}

/* ================================================================== */
/*  Event List                                                         */
/* ================================================================== */

.fohi-upcoming-events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fohi-event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fohi-gray-200);
}

.fohi-event-item:last-child {
    border-bottom: none;
}

.fohi-event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    background: var(--fohi-maroon);
    color: var(--fohi-white);
    border-radius: var(--fohi-radius);
    flex-shrink: 0;
}

.fohi-event-month {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.fohi-event-day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.fohi-event-details {
    display: flex;
    flex-direction: column;
}

.fohi-event-name {
    font-weight: 600;
    color: var(--fohi-gray-900);
}

.fohi-event-time {
    font-size: 13px;
    color: var(--fohi-gray-500);
}

/* ================================================================== */
/*  Announcement Cards                                                 */
/* ================================================================== */

.fohi-announcements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fohi-announcement-item {
    background: var(--fohi-white);
    border: 1px solid var(--fohi-gray-300);
    border-radius: var(--fohi-radius);
    padding: 16px;
    box-shadow: var(--fohi-shadow);
}

.fohi-priority-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.fohi-priority-badge-normal {
    background: var(--fohi-gray-300);
    color: var(--fohi-gray-700);
}

.fohi-priority-badge-important {
    background: var(--fohi-gold);
    color: var(--fohi-gray-900);
}

.fohi-priority-badge-urgent {
    background: var(--fohi-red);
    color: var(--fohi-white);
}

.fohi-announcement-title {
    margin: 0 0 4px;
    font-size: 16px;
}

.fohi-announcement-date {
    font-size: 13px;
    color: var(--fohi-gray-500);
}

/* ================================================================== */
/*  Sponsor Grid / Carousel                                            */
/* ================================================================== */

.fohi-sponsor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: center;
}

.fohi-sponsor-item {
    text-align: center;
    padding: 12px;
}

.fohi-sponsor-logo {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--fohi-transition);
}

.fohi-sponsor-item:hover .fohi-sponsor-logo {
    filter: grayscale(0%);
    opacity: 1;
}

.fohi-sponsor-item a {
    text-decoration: none;
}

.fohi-sponsor-name {
    font-weight: 600;
    color: var(--fohi-gray-700);
}

/* ================================================================== */
/*  Coach Cards                                                        */
/* ================================================================== */

.fohi-coaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.fohi-coach-card {
    position: relative;
    border-radius: var(--fohi-radius);
    overflow: hidden;
    box-shadow: var(--fohi-shadow);
    transition: box-shadow var(--fohi-transition);
}

.fohi-coach-card:hover {
    box-shadow: var(--fohi-shadow-hover);
}

.fohi-coach-photo {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.fohi-coach-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--fohi-white);
    padding: 40px 16px 16px;
}

.fohi-coach-overlay .fohi-coach-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 2px;
}

.fohi-coach-overlay .fohi-coach-title {
    font-size: 13px;
    opacity: 0.85;
}

/* ================================================================== */
/*  Roster Table                                                       */
/* ================================================================== */

.fohi-roster-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fohi-roster-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--fohi-white);
    border-radius: var(--fohi-radius);
    overflow: hidden;
    box-shadow: var(--fohi-shadow);
}

.fohi-roster-table thead {
    background: var(--fohi-maroon);
    color: var(--fohi-white);
}

.fohi-roster-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.fohi-roster-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--fohi-gray-200);
    font-size: 14px;
}

.fohi-roster-table tbody tr:nth-child(even) {
    background: var(--fohi-gray-100);
}

.fohi-roster-table tbody tr:hover {
    background: #fdf0f0;
}

/* ================================================================== */
/*  Resource Link Cards                                                */
/* ================================================================== */

.fohi-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.fohi-resource-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
    background: var(--fohi-white);
    border: 1px solid var(--fohi-gray-300);
    border-radius: var(--fohi-radius);
    box-shadow: var(--fohi-shadow);
    text-decoration: none;
    color: var(--fohi-gray-900);
    transition: all var(--fohi-transition);
}

.fohi-resource-card:hover {
    box-shadow: var(--fohi-shadow-hover);
    border-color: var(--fohi-maroon);
    color: var(--fohi-maroon);
}

.fohi-resource-card .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    color: var(--fohi-maroon);
}

/* ================================================================== */
/*  Player Portal                                                      */
/* ================================================================== */

.fohi-player-portal-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Login form centered */
.fohi-portal-login {
    max-width: 420px;
    margin: 60px auto;
    text-align: center;
}

.fohi-login-form-wrap {
    background: var(--fohi-white);
    border: 1px solid var(--fohi-gray-300);
    border-radius: var(--fohi-radius);
    padding: 32px 24px;
    box-shadow: var(--fohi-shadow);
    margin-top: 24px;
    text-align: left;
}

.fohi-login-form-wrap label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.fohi-login-form-wrap input[type="text"],
.fohi-login-form-wrap input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--fohi-gray-300);
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 16px;
}

.fohi-login-form-wrap input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--fohi-maroon);
    color: var(--fohi-white);
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--fohi-transition);
}

.fohi-login-form-wrap input[type="submit"]:hover {
    background: var(--fohi-maroon-dark);
}

/* Access restricted */
.fohi-portal-restricted {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
}

/* Portal sections */
.fohi-portal-header {
    margin-bottom: 32px;
}

.fohi-portal-section {
    margin-bottom: 40px;
}

.fohi-portal-section h2 {
    font-size: 22px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--fohi-maroon);
    margin-bottom: 20px;
}

/* Quick links grid */
.fohi-portal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.fohi-portal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 16px;
    background: var(--fohi-white);
    border: 1px solid var(--fohi-gray-300);
    border-radius: var(--fohi-radius);
    box-shadow: var(--fohi-shadow);
    text-decoration: none;
    color: var(--fohi-gray-900);
    transition: all var(--fohi-transition);
}

.fohi-portal-card:hover {
    box-shadow: var(--fohi-shadow-hover);
    border-color: var(--fohi-maroon);
    transform: translateY(-2px);
}

.fohi-portal-card .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: var(--fohi-maroon);
    margin-bottom: 10px;
}

.fohi-portal-card-label {
    font-weight: 600;
    font-size: 15px;
}

/* Document list in portal */
.fohi-portal-event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fohi-portal-event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fohi-gray-200);
}

.fohi-portal-event-item:last-child {
    border-bottom: none;
}

/* ================================================================== */
/*  Season Record Widget                                               */
/* ================================================================== */

.fohi-season-record-widget .fohi-record-display {
    font-size: 36px;
    font-weight: 800;
    color: var(--fohi-maroon);
    text-align: center;
    margin: 8px 0;
}

.fohi-season-record-widget .fohi-record-label {
    text-align: center;
    font-size: 13px;
    color: var(--fohi-gray-500);
}

/* ================================================================== */
/*  Next Game Widget                                                   */
/* ================================================================== */

.fohi-next-game-widget {
    text-align: center;
}

.fohi-next-game-widget .fohi-opponent {
    font-size: 18px;
    margin: 8px 0 4px;
}

.fohi-next-game-widget .fohi-game-date,
.fohi-next-game-widget .fohi-game-time,
.fohi-next-game-widget .fohi-game-location {
    font-size: 14px;
    color: var(--fohi-gray-500);
    margin: 2px 0;
}

/* ================================================================== */
/*  No Results Messages                                                */
/* ================================================================== */

.fohi-no-games,
.fohi-no-events,
.fohi-no-announcements,
.fohi-no-sponsors {
    text-align: center;
    color: var(--fohi-gray-500);
    font-style: italic;
    padding: 24px 0;
}

/* ================================================================== */
/*  Responsive Breakpoints                                             */
/* ================================================================== */

@media (min-width: 480px) {
    .fohi-sponsor-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 600px) {
    .fohi-portal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .fohi-sponsor-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .fohi-countdown-digit {
        font-size: 48px;
    }

    .fohi-record-display {
        font-size: 56px;
    }
}

/* Responsive tables */
@media (max-width: 600px) {
    .fohi-schedule-table thead,
    .fohi-roster-table thead {
        display: none;
    }

    .fohi-schedule-table tbody tr,
    .fohi-roster-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--fohi-gray-300);
        border-radius: var(--fohi-radius);
        overflow: hidden;
    }

    .fohi-schedule-table td,
    .fohi-roster-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 14px;
        border-bottom: 1px solid var(--fohi-gray-200);
        font-size: 14px;
    }

    .fohi-schedule-table td::before,
    .fohi-roster-table td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 12px;
        flex-shrink: 0;
    }

    .fohi-schedule-table td:last-child,
    .fohi-roster-table td:last-child {
        border-bottom: none;
    }

    /* Game cards stack score */
    .fohi-game-card {
        flex-wrap: wrap;
    }

    .fohi-game-card-score {
        width: 100%;
        justify-content: center;
        padding-top: 8px;
        border-top: 1px solid var(--fohi-gray-200);
        margin-top: 4px;
    }
}
