/* ============================================================
   PUBLIC LEAGUE TABLE
   CHUNK 4B.1
   ============================================================ */


body {

    margin: 0;

    background: #f4f8fb;

    color: #17364f;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {

    background:
        linear-gradient(
            135deg,
            #07366c,
            #0b64b5
        );

    color: #ffffff;
}


.league-header-inner {

    max-width: 1180px;

    margin: 0 auto;

    padding: 24px 20px;
}


.league-header-inner h1 {

    margin: 0;

    font-size: 1.55rem;
}


.league-header-inner p {

    margin: 5px 0 0;

    opacity: .85;
}


/* ============================================================
   PAGE
   ============================================================ */

.league-main {

    width: calc(100% - 30px);

    max-width: 1120px;

    margin: 0 auto;

    padding: 28px 0 50px;
}


.league-page-heading {

    margin-bottom: 20px;
}


.league-page-heading h2 {

    margin: 0;

    color: #07366c;

    font-size: 1.8rem;
}


.league-page-heading p {

    margin: 4px 0 0;

    color: #60758a;

    font-size: 1rem;

    font-weight: 700;
}


/* ============================================================
   DIVISION SELECTOR
   ============================================================ */

.league-division-selector {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 28px;
}


.league-division-selector a {

    padding: 9px 15px;

    border: 1px solid #bcd4e5;

    border-radius: 999px;

    background: #ffffff;

    color: #0b4f89;

    font-size: .87rem;

    font-weight: 800;

    text-decoration: none;
}


.league-division-selector a:hover {

    background: #edf7fd;
}


.league-division-selector a.active {

    border-color: #0b64b5;

    background: #0b64b5;

    color: #ffffff;
}


/* ============================================================
   TABLE CARD
   ============================================================ */

.league-table-card {

    overflow: hidden;

    border: 1px solid #d2e2ed;

    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 3px 10px
        rgba(20, 61, 91, .05);
}


.league-table-heading {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 15px 18px;

    background:
        linear-gradient(
            135deg,
            #07366c,
            #0b64b5
        );

    color: #ffffff;
}


.league-table-heading h3 {

    margin: 0;

    font-size: 1.08rem;
}


.league-table-heading p {

    margin: 4px 0 0;

    font-size: .78rem;

    font-weight: 700;

    opacity: .82;
}


/* ============================================================
   TABLE
   ============================================================ */

.league-table-scroll {

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}


.league-table-row {

    display: grid;

    grid-template-columns:
        58px
        70px
        minmax(190px, 1fr)
        65px
        80px
        70px;

    align-items: center;

    min-width: 600px;

    min-height: 52px;

    padding: 0 16px;

    border-bottom: 1px solid #e3edf3;
}


.league-table-row:last-child {

    border-bottom: 0;
}


.league-table-columns {

    min-height: 39px;

    background: #eef5fa;

    color: #687f91;

    font-size: .7rem;

    font-weight: 900;

    letter-spacing: .05em;

    text-transform: uppercase;
}


.league-table-columns span:not(:nth-child(3)) {

    text-align: center;
}


.league-position,
.league-trend,
.league-played,
.league-shots,
.league-points {

    text-align: center;
}


.league-position {

    color: #315d7c;

    font-weight: 900;
}


/* ============================================================
   THREE-WEEK POSITION TREND
   ============================================================ */

.league-trend {

    display: flex;

    align-items: center;

    justify-content: center;

    min-width: 0;

    color: #9aabb7;
}


.trend-graph {

    display: block;

    width: 68px;

    height: 34px;

    overflow: visible;
}


.trend-guide {

    stroke: #dce8f0;

    stroke-width: 1;

    stroke-dasharray: 2 3;
}


.trend-line {

    fill: none;

    stroke: #4380aa;

    stroke-width: 2;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.trend-dot {

    fill: #0b64b5;

    stroke: #ffffff;

    stroke-width: 1.5;
}


.trend-none {

    color: #a6b6c1;

    font-weight: 700;
}

/* End Three Week Trend*/


.league-team-name {

    color: #123f63;

    font-weight: 800;
}


.league-played,
.league-shots {

    color: #506b80;

    font-weight: 700;
}


.league-points {

    color: #073f73;

    font-size: 1.02rem;

    font-weight: 900;
}


/*
   Very light alternate shading makes it easier
   to follow a team across a wide table.
*/

.league-table-row:not(.league-table-columns):nth-child(odd) {

    background: #f9fcfe;
}

/*Trend Graph Pop-Up*/
/* ============================================================
   TREND INFORMATION
   ============================================================ */

.trend-heading {

    position: relative;

    display: inline-block;
}


.trend-info-button {

    position: absolute;

    top: -7px;

    right: 3px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 11px;

    height: 11px;

    padding: 0;

    border: 1px solid #8da9bc;

    border-radius: 50%;

    background: #ffffff;

    color: #41657f;

    font-size: 10px;

    font-weight: 900;

    line-height: 1;

    cursor: pointer;
}


.trend-info-button:hover {

    border-color: #0b64b5;

    color: #0b64b5;
}


.trend-info-popup {

    position: absolute;

    z-index: 20;

    top: 22px;

    left: 50%;

    display: none;

    width: 240px;

    padding: 12px 14px;

    border-radius: 8px;

    background: #073f73;

    color: #ffffff;

    font-size: .75rem;

    font-weight: 400;

    line-height: 1.45;

    letter-spacing: 0;

    text-align: left;

    text-transform: none;

    transform: translateX(-50%);

    box-shadow:
        0 4px 12px
        rgba(0, 0, 0, .18);
}


.trend-info-popup strong {

    display: block;

    margin-bottom: 5px;

    font-size: .8rem;
}


.trend-info-popup small {

    display: block;

    margin-top: 6px;

    color: #cfe5f5;

    font-size: .7rem;
}


.trend-info-popup.is-visible {

    display: block;
}


/* ============================================================
   RESULTS MATRIX
   ============================================================ */

.league-matrix-card {

    margin-top: 28px;

    overflow: hidden;

    border: 1px solid #d2e2ed;

    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 3px 10px
        rgba(20, 61, 91, .05);
}


.league-matrix-heading {

    padding: 15px 18px;

    background:
        linear-gradient(
            135deg,
            #07366c,
            #0b64b5
        );

    color: #ffffff;
}


.league-matrix-heading h3 {

    margin: 0;

    font-size: 1.08rem;
}


.league-matrix-heading p {

    margin: 4px 0 0;

    font-size: .78rem;

    font-weight: 700;

    opacity: .82;
}


/* ============================================================
   MATRIX SCROLL AREA
   ============================================================ */

.league-matrix-scroll {

    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}


/* ============================================================
   MATRIX TABLE
   ============================================================ */

.league-matrix-table {

    width: 100%;

    min-width: 720px;

    border-collapse: collapse;

    table-layout: fixed;
}


.league-matrix-table th,
.league-matrix-table td {

    height: 48px;

    padding: 6px 7px;

    border-right: 1px solid #dce8f0;

    border-bottom: 1px solid #dce8f0;

    text-align: center;

    vertical-align: middle;
}


.league-matrix-table tr:last-child th,
.league-matrix-table tr:last-child td {

    border-bottom: 0;
}


.league-matrix-table th:last-child,
.league-matrix-table td:last-child {

    border-right: 0;
}


/* ============================================================
   TOP HEADINGS
   ============================================================ */

.league-matrix-table thead th {

    background: #eaf3f9;

    color: #41657f;

    font-size: .72rem;

    font-weight: 900;

    letter-spacing: .025em;
}


.matrix-team-heading {

    width: 180px;

    text-align: left !important;

    padding-left: 14px !important;
}


.matrix-short-name {

    width: 68px;
}


/* ============================================================
   TEAM NAMES DOWN LEFT
   ============================================================ */

.matrix-team-name {

    width: 180px;

    padding-left: 14px !important;

    background: #f3f8fb;

    color: #123f63;

    font-size: .83rem;

    font-weight: 800;

    text-align: left !important;

    white-space: nowrap;
}


/* ============================================================
   MATRIX CELLS
   ============================================================ */

.matrix-cell {

    width: 68px;

    color: #627b8d;

    font-size: .84rem;

    font-weight: 700;

    white-space: nowrap;
}


.matrix-result {

    background: #ffffff;

    color: #073f73;

    font-weight: 900;
}


.matrix-unplayed {

    background: #fbfdfe;

    color: #b4c1ca;
}


.matrix-self {

    background:
        repeating-linear-gradient(
            135deg,
            #edf3f7,
            #edf3f7 5px,
            #e5edf2 5px,
            #e5edf2 10px
        );

    color: #9badb9;
}


/*
   Very subtle row shading.
*/

.league-matrix-table tbody tr:nth-child(even)
.matrix-result {

    background: #f8fbfd;
}


/* ============================================================
   MATRIX KEY
   ============================================================ */

.league-matrix-key {

    display: flex;

    flex-wrap: wrap;

    gap: 8px 22px;

    padding: 11px 16px;

    border-top: 1px solid #dce8f0;

    background: #f4f9fc;

    color: #61798b;

    font-size: .75rem;
}


.league-matrix-key strong {

    color: #315a78;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.league-empty-card {

    padding: 22px;

    border: 1px solid #d5e5f0;

    border-radius: 12px;

    background: #ffffff;
}


.league-empty-card h3 {

    margin: 0 0 6px;

    color: #07366c;
}


.league-empty-card p {

    margin: 0;

    color: #62788b;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 650px) {

    .league-header-inner {

        padding: 18px 15px;
    }


    .league-header-inner h1 {

        font-size: 1.2rem;
    }


    .league-main {

        width: calc(100% - 20px);

        padding-top: 20px;
    }


    .league-table-row {

        grid-template-columns:
            42px
            52px
            minmax(145px, 1fr)
            48px
            62px
            54px;

        min-width: 500px;

        padding-left: 10px;

        padding-right: 10px;
    }


    .league-team-name {

        font-size: .88rem;
    }
    
        .league-matrix-card {

        margin-top: 20px;
    }


    .league-matrix-table {

        min-width: 620px;
    }


    .matrix-team-heading,
    .matrix-team-name {

        width: 145px;
    }


    .matrix-short-name,
    .matrix-cell {

        width: 59px;
    }


    .matrix-team-name {

        font-size: .78rem;
    }


    .matrix-cell {

        font-size: .78rem;
    }


    .league-matrix-key {

        gap: 5px 14px;

        font-size: .7rem;
    }
    
        .trend-graph {

        width: 52px;

        height: 30px;
    }

}


/* ============================================================
   POINTS ADJUSTMENTS
   ============================================================ */

.league-adjustments {
    margin-top: 16px;
    padding: 15px 18px;

    border: 1px solid #c9d8e3;
    border-radius: 8px;

    background: #f8fbfd;
}

.league-adjustments h3 {
    margin: 0 0 10px;

    font-size: .95rem;
    color: #173f5d;
}

.league-adjustment-note {
    display: flex;
    align-items: baseline;
    gap: 7px;

    padding: 5px 0;

    color: #435866;
    font-size: .86rem;
}

.league-adjustment-note + .league-adjustment-note {
    border-top: 1px solid #e0e9ef;
}

.league-adjustment-amount {
    min-width: 32px;
    font-weight: 800;
}

.league-adjustment-amount.is-negative {
    color: #9d3030;
}

.league-adjustment-amount.is-positive {
    color: #187447;
}


@media (max-width: 600px) {

    .league-adjustments {
        padding: 13px 14px;
    }

    .league-adjustment-note {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 3px 7px;
    }

    .league-adjustment-note > span:last-child {
        grid-column: 1 / -1;
    }

}