/* Fixtures and Ladders Plugin Styles - fal.css */

/* =================================================================== */
/* 1. CRICKET LADDER STYLES (phq-ladder-*)
/* =================================================================== */

.phq-ladder-widget {
    margin-bottom: 30px; /* Space between multiple ladders */
    font-family: Arial, Helvetica, sans-serif; /* Clean sans-serif font */
    font-size: 14px; /* Slightly smaller base font size */
    line-height: 1.4;
    color: #333;
}

.phq-ladder-grade-name {
    font-size: 1.4em; /* Larger than table text */
    margin-bottom: 10px;
    color: #1a5276; /* A darker blue for headings */
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.phq-ladder-table {
    width: 100%;
    border-collapse: collapse; /* Removes space between borders */
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); /* Subtle shadow */
}

.phq-ladder-table th,
.phq-ladder-table td {
    border: 1px solid #ddd; /* Light grey border for cells */
    padding: 6px 8px;     /* Smaller padding */
    text-align: left;
    vertical-align: middle;
}

.phq-ladder-table thead th {
    background-color: #f2f2f2; /* Light grey background for headers */
    color: #333;
    font-weight: bold;
    font-size: 0.9em; /* Slightly smaller header text */
    text-transform: uppercase; /* Uppercase headers */
}

.phq-ladder-table tbody tr {
    background-color: #fff; /* Default white row */
}

.phq-ladder-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; /* Alternating light grey row */
}

.phq-ladder-table tbody tr:hover {
    background-color: #e9e9e9; /* Hover effect */
}

.phq-ladder-rank {
    text-align: center;
    width: 50px;
}

.phq-ladder-team-name {
    font-weight: normal;
}

.phq-ladder-table td.phq-ladder-d-played,
.phq-ladder-table td.phq-ladder-d-competitionpoints,
.phq-ladder-table td.phq-ladder-d-quotient,
.phq-ladder-table td.phq-ladder-d-won,
.phq-ladder-table td.phq-ladder-d-lost,
.phq-ladder-table td.phq-ladder-d-ties,
.phq-ladder-table td.phq-ladder-d-noresults,
.phq-ladder-table td.phq-ladder-d-byes {
    text-align: center;
}

.phq-ladder-no-data {
    padding: 10px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 4px;
}

.phq-ladder-row-empty td {
    text-align: center;
    font-style: italic;
    color: #777;
    padding: 15px;
}


/* =================================================================== */
/* 2. FIXTURE STYLES (phq-fixture-*)
/* =================================================================== */

.phq-fixture-widget {
    margin-bottom: 30px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.phq-fixture-team-title {
    font-size: 1.4em;
    margin-bottom: 3px;
    color: #1a5276;
    font-weight: bold;
}

.phq-fixture-grade-title {
    font-size: 1.1em;
    margin-top: 0px;
    margin-bottom: 15px;
    color: #555;
    font-weight: normal;
    font-style: italic;
}

.phq-fixture-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.phq-fixture-table td {
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 10px;
    vertical-align: top;
}

.phq-fixture-round-row td.phq-fixture-round-details {
    background-color: #eaf2f8;
    color: #1a5276;
    font-weight: bold;
    font-size: 1.1em;
    padding: 10px;
    border-top: 2px solid #c5d9e8;
    border-bottom: 1px solid #c5d9e8;
}

.phq-fixture-game-group-even .phq-fixture-team-row {
    background-color: #fff;
}
.phq-fixture-game-group-odd .phq-fixture-team-row {
    background-color: #f9f9f9;
}

.phq-fixture-team-row:hover {
    background-color: #eef;
}

.phq-fixture-team-name {
    width: 45%;
    font-weight: normal;
}

.phq-fixture-score {
    width: 15%;
    text-align: center;
    font-weight: bold;
}

.phq-fixture-venue {
    width: 40%;
    font-size: 0.9em;
    line-height: 1.3;
}
.phq-fixture-venue-address {
    color: #555;
    display: block;
    margin-top: 3px;
}

.phq-fixture-team-row.phq-team-winner .phq-fixture-team-name {
    font-weight: bold;
}

.phq-fixture-no-data,
.phq-fixture-error {
    padding: 10px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 4px;
}
.phq-fixture-row-empty td {
    text-align: center;
    font-style: italic;
    color: #777;
    padding: 15px;
}

/* =================================================================== */
/* 3. NEW: AFL LADDER STYLES (phq-afl-ladder-*)
/* =================================================================== */

.phq-afl-ladder {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden; /* To ensure child borders don't poke out */
}

.phq-afl-ladder__grade-name {
    font-size: 1.4em;
    margin: 0;
    padding: 12px 15px;
    color: #1a5276;
    font-weight: bold;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.phq-afl-ladder__header,
.phq-afl-ladder__row {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
}
.phq-afl-ladder__row:last-child {
    border-bottom: none;
}

.phq-afl-ladder__header {
    background-color: #f2f2f2;
    font-weight: normal;
    font-size: 0.9em;
    text-transform: uppercase;
}
/* If the ladder's grade name is hand entered into the page, set display: none */
h3.phq-afl-ladder__grade-name {
    display: none;
}

.phq-afl-ladder__row--even {
    background-color: #fff;
}
.phq-afl-ladder__row--odd {
    background-color: #f9f9f9;
}
.phq-afl-ladder__row:hover {
    background-color: #e9e9e9;
}

.phq-afl-ladder__header-cell,
.phq-afl-ladder__cell {
    box-sizing: border-box; /* Ensures padding is included in width/flex-basis */
}

/* Cell alignment and sizing */
.phq-afl-ladder__header-cell--team,
.phq-afl-ladder__cell--team {
    flex: 1; /* This makes the team column take up the remaining space */
    min-width: 0; /* Important for flexbox to allow shrinking */
    display: flex;
    align-items: center;
    text-align: left;
}

.phq-afl-ladder__header-cell:not(.phq-afl-ladder__header-cell--team),
.phq-afl-ladder__cell:not(.phq-afl-ladder__cell--team) {
    flex-basis: 50px; /* Base width for stat columns */
    flex-shrink: 0;
    justify-content: center; /* Center content horizontally */
    text-align: center;
}

/* Specific cell widths for FULL mode to accommodate more columns */
.phq-afl-ladder--full .phq-afl-ladder__header-cell:not(.phq-afl-ladder__header-cell--team),
.phq-afl-ladder--full .phq-afl-ladder__cell:not(.phq-afl-ladder__cell--team) {
    flex-basis: 45px; /* Slightly smaller for more columns */
    font-size: 0.95em;
}

/* Team cell inner elements */
.phq-afl-ladder__rank {
    font-weight: bold;
    width: 30px;
    flex-shrink: 0;
    text-align: left;
}

.phq-team-logo.phq-ladder-team-logo {
    flex-shrink: 0;
}

.phq-afl-ladder__team-name {
    padding-left: 8px; /* Space between logo and name */
}

/* Set the font size and logo size to be smaller in the widget */
.phq-afl-ladder--widget {
    font-size: 12px;
}
.phq-afl-ladder--widget img.phq-team-logo {
    max-height: 28px;
    width: auto;
}

/* Styles for the empty message when using the div layout */
.phq-afl-ladder__row--empty {
    justify-content: center;
    font-style: italic;
    color: #777;
    padding: 20px;
}

/* =================================================================== */
/* 4. NEW: AFL NEXT MATCH WIDGET STYLES (phq-nextmatch-*)
/* =================================================================== */

.phq-nextmatch-widget {
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 30px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.phq-nextmatch-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
}
.phq-nextmatch-sponsor {
    display: flex;
    align-items: center;
}
.phq-nextmatch-sponsor img {
    max-height: 25px; /* Control sponsor logo height */
    width: auto;
}

.phq-nextmatch-content {
    padding: 20px;
    text-align: center;
}

.phq-nextmatch-matchup {
    font-size: 1.8em;
    font-weight: bold;
    color: #1a5276;
    margin: 0 0 10px;
}

.phq-nextmatch-venue {
    font-size: 1em;
    color: #666;
    margin: 0 0 15px;
}

.phq-nextmatch-time-details {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.phq-nextmatch-separator {
    margin: 0 10px;
    color: #ccc;
}

.phq-nextmatch-button-wrapper {
    padding: 0 20px 20px;
    text-align: center;
}

.phq-nextmatch-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #003366; /* Example color */
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.phq-nextmatch-button:hover {
    background-color: #002244; /* Darker on hover */
    color: #fff;
}

/* =================================================================== */
/* 5. NEW: FIXTURE LAYOUT B STYLES (phq-fixture-b-*)
/* =================================================================== */

.phq-fixture-b-widget {
    font-family: Arial, Helvetica, sans-serif;
}

.phq-fixture-b__date-header {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin: 30px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.phq-fixture-b__round-header {
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    color: #555;
    margin: 20px 0 10px 0;
}

.phq-fixture-b__content {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.phq-fixture-b__details-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
}

.phq-fixture-b__match-team {
    display: flex;
    align-items: center;
    flex-basis: 35%; /* Give teams a base width */
    font-size: 1.2em;
    font-weight: bold;
}

.phq-fixture-b__match-team--home {
    justify-content: flex-start;
}

.phq-fixture-b__match-team--away {
    justify-content: flex-end;
    text-align: right;
}

.phq-fixture-b__match-team-logo {
    width: 96px;
    height: 96px;
}

.phq-fixture-b__match-team-name {
    margin: 0 10px;
}

.phq-fixture-b__match-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-basis: 20%;
    min-width: 120px; /* Ensure it doesn't get too squished */
}

.phq-fixture-b__match-score-total {
    font-size: 1.8em;
    font-weight: bold;
    padding: 0 15px;
}

.phq-fixture-b__match-time,
.phq-fixture-b__match-status-final {
    font-size: 0.9em;
    text-transform: uppercase;
    font-weight: bold;
    color: #888;
}

.phq-fixture-b__match-summary,
.phq-fixture-b__match-venue {
    padding: 10px 15px;
    font-size: 0.9em;
    text-align: center;
    color: #555;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.phq-fixture-b__match-summary {
    font-weight: bold;
}

