/**
 * v0.36.5.3.6 (5.3f §1) — Special Teams Family Card styles.
 * Tiles, rank pills, and modal overlay.
 */

/* ---------- Summary tiles ---------- */
.nfl-st-tiles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 0 0 16px;
}

@media (max-width: 720px) {
    .nfl-st-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

.nfl-st-tile {
    background: #fafafa;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    padding: 14px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nfl-st-tile__label {
    font-size: 12px;
    color: #5b6370;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.nfl-st-tile__value {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.1;
}

.nfl-st-tile__rank {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    align-self: center;
}

.nfl-st-tile__rank.is-good {
    background: #d4edda;
    color: #155724;
}

.nfl-st-tile__rank.is-mid {
    background: #fff3cd;
    color: #856404;
}

.nfl-st-tile__rank.is-bad {
    background: #f8d7da;
    color: #721c24;
}

.nfl-st-tile__rank.is-na {
    background: #f0f0f1;
    color: #757980;
}

/* ---------- Details button row ---------- */
.nfl-st-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.nfl-st-details-btn {
    font-weight: 600;
}

/* ---------- Modal ---------- */
.nfl-st-modal[hidden] {
    display: none !important;
}

.nfl-st-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nfl-st-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 23, 28, 0.55);
}

.nfl-st-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    max-width: 720px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 64px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.nfl-st-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e4e7;
}

.nfl-st-modal__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1d2327;
}

.nfl-st-modal__close {
    background: transparent;
    border: 0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #5b6370;
    padding: 0 6px;
}

.nfl-st-modal__close:hover {
    color: #1d2327;
}

.nfl-st-modal__body {
    padding: 16px 18px;
    overflow-y: auto;
}

/* ---------- Modal sections ---------- */
.nfl-st-section {
    margin: 0 0 22px;
    padding: 0 0 16px;
    border-bottom: 1px solid #f0f0f1;
}

.nfl-st-section:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}

.nfl-st-section h3 {
    font-size: 15px;
    margin: 0 0 10px;
    color: #1d2327;
}

.nfl-st-section h4 {
    font-size: 13px;
    margin: 14px 0 6px;
    color: #5b6370;
    font-weight: 600;
}

.nfl-st-source-badge {
    display: inline-block;
    background: #2271b1;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.04em;
}

/* ---------- KV grid ---------- */
.nfl-st-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.nfl-st-kv {
    background: #f6f7f7;
    border-radius: 4px;
    padding: 8px 10px;
}

.nfl-st-kv__label {
    font-size: 11px;
    color: #5b6370;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 2px;
}

.nfl-st-kv__value {
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}

/* ---------- Distance table ---------- */
.nfl-st-distance-table {
    margin-top: 6px;
}

.nfl-st-distance-table th,
.nfl-st-distance-table td {
    text-align: center;
    padding: 6px 10px;
}

.nfl-st-distance-table th:first-child,
.nfl-st-distance-table td:first-child {
    text-align: left;
}

/* ---------- Distance lists ---------- */
.nfl-st-list {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    color: #1d2327;
    background: #f6f7f7;
    padding: 8px 10px;
    border-radius: 4px;
    margin: 6px 0 0;
    line-height: 1.6;
}

.nfl-st-empty {
    color: #5b6370;
    font-style: italic;
    margin: 0;
}

/* v0.36.5.3.6.1 — Distance pills replace the wall-of-numbers list. */
.nfl-st-pills {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 6px 0 0;
}

.nfl-st-pills__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

.nfl-st-pills__bucket {
    font-size: 11px;
    color: #5b6370;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    width: 72px;
    flex-shrink: 0;
}

.nfl-st-pills__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.nfl-st-pills__count {
    font-size: 11px;
    color: #757980;
    flex-shrink: 0;
}

.nfl-st-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e2e4e7;
    color: #1d2327;
    min-width: 26px;
    text-align: center;
}

.nfl-st-pill--made {
    background: #d4edda;
    color: #155724;
}

.nfl-st-pill--missed {
    background: #f8d7da;
    color: #721c24;
}

.nfl-st-pill--blocked {
    background: #fff3cd;
    color: #856404;
}

.nfl-st-pill--gwfg {
    background: #cce5ff;
    color: #004085;
}

@media (max-width: 480px) {
    .nfl-st-pills__bucket {
        width: 60px;
        font-size: 10px;
    }
}

/* v0.36.5.3.8 (5.3g) Phase 5 — tile label as link to /stat/{id}/{year}/.
 * Keeps the tile label visually identical, just adds the link colour and
 * underline-on-hover affordance. */
.nfl-st-tile__label-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted #c3c4c7;
    cursor: pointer;
}
.nfl-st-tile__label-link:hover,
.nfl-st-tile__label-link:focus {
    color: #2271b1;
    border-bottom-color: #2271b1;
}
