/*
 * GBCC Public Fixtures
 * Fixture-specific styling
 */

.fixtures-page {
    background: #f5f7f8;
}


/* =========================================================
   Page Container
   ========================================================= */

.fixtures-page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 35px 25px 50px;
    flex: 1;
}


/* =========================================================
   Page Header
   ========================================================= */

.fixtures-page-header {
    margin-bottom: 30px;
}

.fixtures-page-header h1 {
    margin: 0 0 8px;
    color: #142d3d;
}

.fixtures-page-header p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}


/* =========================================================
   Main Fixture Section
   ========================================================= */

.fixtures-page-section {
    width: 100%;
    background: #fff;
    border: 1px solid #d9ddd8;
    border-radius: 10px;
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}


/* =========================================================
   Section Header
   ========================================================= */

.fixtures-page-section-header {
    display: block;
    padding: 22px 25px;
    border-bottom: 1px solid #d9ddd8;
}


/* =========================================================
   Filters
   ========================================================= */

.fixtures-page-filters {
    width: 100%;
    display: flex;
    justify-content: center;
}

.fixtures-page-filters form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.fixtures-page-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fixtures-page-filter label {
    font-weight: 600;
    white-space: nowrap;
}

.fixtures-page-filter select {
    min-width: 170px;
    padding: 10px 12px;
    border: 1px solid #c7cdd4;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
}

.fixtures-page-filter select:focus {
    outline: none;
    border-color: #1f4d3a;
    box-shadow:
        0 0 0 2px rgba(31, 77, 58, 0.15);
}


/* =========================================================
   Table Wrapper
   ========================================================= */

.fixtures-page-table-wrapper {
    width: 100%;
    max-height: 70vh;
    border: 1px solid #d9ddd8;

    /*
     * This element handles both horizontal
     * and vertical scrolling.
     */
    overflow: auto;

    -webkit-overflow-scrolling: touch;

    /*
     * Rounded outer corners.
     */
    border-radius: 12px;
}


/* =========================================================
   Table
   ========================================================= */

.fixtures-page-table {
    width: 100%;
    min-width: 900px;

    border-collapse: separate;
    border-spacing: 0;

    background: #fff;
    font-size: 0.9rem;
}


/* =========================================================
   Table Header
   ========================================================= */

.fixtures-page-table thead th {
    padding: 14px 15px;

    background: #142d3d;
    color: #fff;

    text-align: left;

    font-size: 0.76rem;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.04em;

    white-space: nowrap;

    /*
     * Sticky header.
     */
    position: sticky;
    top: 0;

    z-index: 10;
}


/*
 * Make sure the sticky header has
 * a solid background.
 */

.fixtures-page-table thead {
    background: #142d3d;
}


/*
 * Header corner rounding.
 */

.fixtures-page-table thead th:first-child {
    border-top-left-radius: 12px;
}

.fixtures-page-table thead th:last-child {
    border-top-right-radius: 12px;
}


/* =========================================================
   Table Body
   ========================================================= */

.fixtures-page-table tbody td {
    padding: 8px 15px;
    border-bottom: 1px solid #e3e6e3;
    color: #303330;
    vertical-align: middle;
    text-align: left;
    white-space: nowrap;
    line-height: 1.35;
}


/*
 * Alternating rows
 */

.fixtures-page-table tbody tr:nth-child(even) {
    background: #f5f7f8;
}

.fixtures-page-table tbody tr:nth-child(odd) {
    background: #fff;
}


/*
 * Hover
 */

.fixtures-page-table tbody tr:hover {
    background: #e9eef0;
}


/*
 * Last row
 */

.fixtures-page-table tbody tr:last-child td {
    border-bottom: none;
}


/*
 * Bottom corner rounding.
 */

.fixtures-page-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.fixtures-page-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}


/* =========================================================
   Date
   ========================================================= */

.fixtures-page-date {
    min-width: 105px;
    white-space: nowrap;
}

.fixtures-page-date-value {
    display: block;

    font-weight: 600;
    color: #222;
}

.fixtures-page-time {
    display: block;

    margin-top: 3px;

    color: #777;
    font-size: 0.78rem;
}


/* =========================================================
   Teams
   ========================================================= */

.fixtures-page-team {
    min-width: 135px;

    color: #1f4d3a;
    font-weight: 600;
}


/* =========================================================
   Venue
   ========================================================= */

.fixtures-page-venue {
    min-width: 145px;

    color: #444;
}


/* =========================================================
   League
   ========================================================= */

.fixtures-page-league {
    min-width: 120px;

    color: #333;
}


/* =========================================================
   Season
   ========================================================= */

.fixtures-page-season {
    min-width: 90px;

    color: #555;

    white-space: nowrap;
}


/* =========================================================
   Status
   ========================================================= */

.fixtures-page-status-cell {
    white-space: nowrap;
}

.fixtures-page-status {
    display: inline-block;

    padding: 5px 10px;

    border-radius: 20px;

    background: #e7eae7;
    color: #444;

    font-size: 0.75rem;
    font-weight: 600;

    line-height: 1.2;

    white-space: nowrap;
}


/*
 * Result states
 */

.fixtures-page-status.won,
.fixtures-page-status.completed {
    background: #dceee3;
    color: #1d6139;
}

.fixtures-page-status.lost {
    background: #f3dddd;
    color: #8a2929;
}

.fixtures-page-status.draw,
.fixtures-page-status.tie {
    background: #e5e8ed;
    color: #47505a;
}

.fixtures-page-status.upcoming {
    background: #e9edf0;
    color: #394b58;
}

.fixtures-page-status.postponed {
    background: #f4ead5;
    color: #80601d;
}

.fixtures-page-status.cancelled {
    background: #f3dddd;
    color: #8a2929;
}


/* =========================================================
   Clickable Fixture Rows
   ========================================================= */

.fixtures-page-row-clickable {
    cursor: pointer;

    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease;
}

.fixtures-page-row-clickable:hover {
    background: #eaf1ed !important;

    box-shadow:
        inset 4px 0 0 #1f4d3a;
}

.fixtures-page-row-clickable:focus {
    outline: 2px solid #1f4d3a;
    outline-offset: -2px;
}


/* =========================================================
   Empty State
   ========================================================= */

.fixtures-page-empty {
    padding: 55px 25px;

    text-align: center;
}

.fixtures-page-empty h3 {
    margin: 0 0 8px;

    color: #142d3d;
}

.fixtures-page-empty p {
    margin: 0;

    color: #777;
}


/* =========================================================
   Navigation
   ========================================================= */

.fixtures-page-navigation {
    display: flex;
    justify-content: center;

    gap: 15px;

    margin-top: 25px;
}

.fixtures-page-link {
    display: inline-block;

    padding: 10px 18px;

    border: 1px solid #1f4d3a;
    border-radius: 6px;

    color: #1f4d3a;

    text-decoration: none;

    font-size: 0.88rem;
    font-weight: 600;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.fixtures-page-link:hover {
    background: #1f4d3a;
    color: #fff;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {

    .fixtures-page-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .fixtures-page-filters {
        width: 100%;
    }

    .fixtures-page-filters form {
        width: 100%;
    }

    .fixtures-page-filter {
        flex: 1;
    }

    .fixtures-page-filter select {
        width: 100%;
    }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

    .fixtures-page-container {
        padding: 25px 15px 40px;
    }

    .fixtures-page-header {
        margin-bottom: 20px;
    }

    .fixtures-page-section-header {
        padding: 18px;
    }

    .fixtures-page-filters form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .fixtures-page-filter {
        width: 100%;
    }

    .fixtures-page-filter select {
        width: 100%;
    }

    .fixtures-page-table {
        min-width: 850px;
        font-size: 0.84rem;
    }

    .fixtures-page-table thead th {
        padding: 12px 10px;
        font-size: 0.72rem;
    }

    .fixtures-page-table tbody td {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .fixtures-page-status {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .fixtures-page-navigation {
        flex-direction: column;
        align-items: stretch;
    }

    .fixtures-page-link {
        text-align: center;
    }

}