
.fpl-component {
    margin: 1.5rem 0;
}

.fpl-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.fpl-control-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.fpl-sort-switcher {
    flex-wrap: nowrap;
}

.fpl-sort-switcher label {
    margin: 0;
    white-space: nowrap;
    font-weight: 600;
}

.fpl-control-button {
    border: 1px solid rgba(0,0,0,0.15);
    background: #fff;
    color: inherit;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fpl-control-button:hover,
.fpl-control-button:focus,
.fpl-control-button.is-active {
    background: #0099DB;
    color: #ffffff;
    border-color: #0099DB;
}

.fpl-sort-select {
    min-width: 140px;
    padding: 0.45rem 0.7rem;
}

.fpl-pane {
    display: none;
}

.fpl-pane.is-active {
    display: block;
}

.fpl-table-wrap {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fpl-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.fpl-table th,
.fpl-table td {
    padding: 0.7rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    text-align: left;
    white-space: nowrap;
    background: #ffffff;
}

.fpl-table thead th {
    background: #0099DB;
    color: #ffffff;
}

.fpl-table tbody tr.fpl-row-odd td:nth-child(n+3) {
    background: #d7d7d7;
}

.fpl-table tbody tr.fpl-row-even td:nth-child(n+3) {
    background: #e3e3e3;
}

.fpl-table tbody tr.fpl-row-odd td:first-child,
.fpl-table tbody tr.fpl-row-odd td:nth-child(2) {
    background: #ffffff;
}

.fpl-table tbody tr.fpl-row-even td:first-child,
.fpl-table tbody tr.fpl-row-even td:nth-child(2) {
    background: #f7f7f7;
}

.fpl-table tbody tr.fpl-rank-1 td {
    box-shadow: inset 0 0 0 9999px rgba(212, 175, 55, 0.13);
}

.fpl-table tbody tr.fpl-rank-2 td {
    box-shadow: inset 0 0 0 9999px rgba(160, 160, 160, 0.10);
}

.fpl-table tbody tr.fpl-rank-3 td {
    box-shadow: inset 0 0 0 9999px rgba(205, 127, 50, 0.10);
}

.fpl-table tbody tr:hover td {
    box-shadow: inset 0 0 0 9999px rgba(0, 153, 219, 0.06);
}

.fpl-position-cell,
.fpl-table thead th:first-child {
    text-align: right;
    font-weight: 700;
    padding-right: 0.95rem;
}

.fpl-round-head {
    margin-bottom: 1rem;
}

.fpl-notice {
    padding: 0.9rem 1rem;
    background: #f7f7f7;
    border-left: 4px solid #333;
}

.fpl-rotate-message {
    display: none;
    text-align: center;
    font-size: 13px;
    margin-bottom: 0.75rem;
    color: #666666;
}

.fpl-name-abbr {
    display: none;
}

@media (max-width: 1024px) {
    .fpl-controls {
        align-items: center;
    }

    .fpl-rotate-message {
        display: block;
    }

    .fpl-sort-switcher {
        flex-direction: row;
        align-items: center;
    }

    .fpl-table {
        min-width: 760px;
    }

    .fpl-full-table {
        min-width: 980px;
    }

    .fpl-round-table {
        min-width: 780px;
    }

    .fpl-table {
        --fpl-pos-width: 42px;
        --fpl-name-width: 190px;
    }

    .fpl-table th,
    .fpl-table td {
        padding: 0.55rem;
        font-size: 0.9rem;
        position: relative;
        background-clip: padding-box;
    }

    .fpl-name-full {
        display: none;
    }

    .fpl-name-abbr {
        display: inline;
    }

    .fpl-table th:first-child,
    .fpl-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 7;
        width: var(--fpl-pos-width);
        min-width: var(--fpl-pos-width);
        max-width: var(--fpl-pos-width);
        background: inherit;
        box-shadow: 1px 0 0 rgba(0,0,0,0.08);
        padding-left: 0.35rem;
        padding-right: 0.45rem;
    }

    .fpl-table th:nth-child(2),
    .fpl-table td:nth-child(2) {
        position: sticky;
        left: var(--fpl-pos-width);
        z-index: 6;
        width: var(--fpl-name-width);
        min-width: var(--fpl-name-width);
        max-width: var(--fpl-name-width);
        background: inherit;
        box-shadow: 1px 0 0 rgba(0,0,0,0.08);
        padding-left: 0.45rem;
        padding-right: 0.45rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fpl-table thead th:first-child,
    .fpl-table thead th:nth-child(2) {
        background: #0099DB;
        z-index: 9;
    }
}

@media (max-width: 820px) {
    .fpl-controls {
        align-items: stretch;
    }

    .fpl-sort-switcher {
        flex-direction: column;
        align-items: flex-start;
    }

    .fpl-sort-select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .fpl-table {
        --fpl-pos-width: 38px;
        --fpl-name-width: 178px;
    }
}


.fpl-league-header {
    text-align: center;
    margin: 0 0 1rem;
}

.fpl-league-logo {
    display: inline-block;
    width: auto;
    max-width: 100%;
    max-height: 120px;
    height: auto;
}

.fpl-sort-switcher .fpl-sort-select {
    border-color: #0099DB;
}

@media (max-width: 1024px) {
    .fpl-league-header {
        margin-bottom: 0.85rem;
    }

    .fpl-league-logo {
        max-height: 90px;
    }
}

@media (max-width: 600px) {
    .fpl-league-logo {
        max-height: 70px;
    }
}


.fpl-sort-current {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 153, 219, 0.10);
    color: #006b99;
    font-size: 0.9rem;
    font-weight: 600;
}

.fpl-mini-component {
    margin: 1rem 0;
}

.fpl-mini-wrap {
    overflow: hidden;
    border-radius: 10px;
}

.fpl-mini-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.fpl-mini-table th,
.fpl-mini-table td {
    white-space: nowrap;
    padding: 0.65rem 0.7rem;
}

.fpl-mini-pos-head,
.fpl-mini-table .fpl-position-cell {
    width: 42px;
}

.fpl-mini-pts-head,
.fpl-mini-points {
    width: 56px;
    text-align: right;
}

.fpl-mini-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.fpl-mini-table tbody tr.fpl-row-odd td:nth-child(3) {
    background: #d7d7d7;
}

.fpl-mini-table tbody tr.fpl-row-even td:nth-child(3) {
    background: #e3e3e3;
}

.fpl-mini-footer {
    padding: 0.7rem 0.85rem;
    background: #f5f5f5;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.fpl-mini-link {
    color: #0099DB;
    font-weight: 600;
    text-decoration: none;
}

.fpl-mini-link:hover,
.fpl-mini-link:focus {
    color: #0077aa;
    text-decoration: underline;
}
