/* ── Hero ─────────────────────────────────────────────────────────────── */

.stable-hero-card {
    background-image: linear-gradient(rgba(27,26,26, 0.7), rgba(27,26,26, 0.7)),
    url('/public/sgt-stable/hero.jpg');
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
}


/* ── Tabs (mirrors quest/page.css .quest-select-item) ────────────────── */

.stable-select-item {
    min-width: 32px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.stable-select-item.active {
    color: var(--sgt-red);
    border-bottom: 2px solid var(--sgt-red);
}


/* ── Lineup cards ─────────────────────────────────────────────────────── */

.stable-week-tab.active {
    background-color: var(--sgt-red);
    color: #fff;
}

.stable-tier-badge {
    min-width: 55px;
    padding: 0.4rem 0.75rem;
}

.stable-player-tour-select {
    /* Fixed (not max-) width so every dropdown lines up — sized for the longest realistic
       option text, e.g. "WEB+ (-108)". */
    width: 160px;
    flex: 0 0 auto;
    display: inline-block;
}

.stable-player-tour-select .dropdown-toggle {
    width: 100%;
}


/* ── Player avatar + flag (mirrors squads/page.css) ──────────────────── */

.player-avatar-wrapper {
    height: 32px;
    width: 32px;
    margin-right: 9px;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: auto;
}

.player-flag {
    position: absolute;
    bottom: 0;
    right: -9px;
    height: 18px;
    width: 18px !important;
    border-radius: 50%;
}

@media (max-width: 768px) {

    .player-avatar-wrapper:not(.no-shrink) {
        height: 24px;
        width: 24px;
        margin-right: 6px;
    }

    .player-avatar:not(.no-shrink) {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        overflow: hidden;
    }

    .player-avatar:not(.no-shrink) img {
        width: 100%;
        height: auto;
    }

    .player-flag:not(.no-shrink) {
        position: absolute;
        bottom: 0;
        right: -6px;
        height: 12px;
        width: 12px !important;
        border-radius: 50%;
    }

}


/* ── Roster invite (mirrors squads/page.css .member-invite-wrapper) ──── */

.stable-member-invite-wrapper {
    max-width: 500px;
    margin: auto;
}

#stable-send-invite-btn {
    width: 75px;
}

#stable-clear-member-select {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 20px;
    color: var(--sgt-red);
}

#stable-member-select:focus {
    border-color: var(--sgt-red);
    outline: 0;
    box-shadow: 0 0 0 1px rgba(208, 63, 37, 1.0);
}

.autocomplete-suggestions {
    background-color: white;
    border-radius: 0.375rem;
    padding-left: 10px;
    padding-right: 10px;
    overflow-y: hidden;
}

.autocomplete-suggestion {
    cursor: pointer;
}


/* ── Dropdowns (mirrors course-team-records/page.css #format-select) — a Bootstrap
   dropdown-button + dropdown-menu in place of a native <select>, used for both the
   per-player tour picker and the Events week picker ─────────────────────────────── */

.stable-dropdown .dropdown-toggle {
    min-width: 160px;
    /* Reserve room on the right so long labels never run under the arrow. */
    padding-right: 2rem;
    box-sizing: border-box;
}

.stable-dropdown .dropdown-toggle::after {
    display: none;
}

.stable-dropdown button,
.stable-dropdown button:hover,
.stable-dropdown button:focus,
.stable-dropdown button:active,
.stable-dropdown button.show {
    /* Plain (non-variant) Bootstrap .btn resolves its hover/focus/active background from
       --bs-btn-hover-bg, which is never defined here — it computes to transparent, letting
       the dark page behind show through. Pin every state to the same white/dark look. */
    color: var(--sgt-dark-gray) !important;
    background-color: var(--sgt-white) !important;
    border-color: var(--sgt-light-gray) !important;
}

.stable-dropdown-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.stable-dropdown .dropdown-menu {
    min-width: 160px;
    box-sizing: border-box;
}

.stable-dropdown-item {
    padding-left: 12px;
    padding-right: 12px;
    cursor: pointer;
    color: var(--sgt-dark-gray) !important;
}

.stable-dropdown-item.active, .stable-dropdown-item:active {
    background-color: var(--sgt-light) !important;
}


/* ── Icon buttons (mirrors course-team-records/page.css .course-card-button) ─────── */

.course-card-button {
    height: 36px;
    width: 36px;
    line-height: 36px;
}


/* ── Standings table (mirrors tour/page.css .standings-table) ─────────── */

.standings-table-wrapper {
    overflow-x: auto;
}

.expand-cell {
    width: 99%;
}

.standings-table tbody tr.odd {
    background-color: var(--sgt-md-gray);
}

.standings-table tbody tr.odd .position {
    border-right: 1px solid var(--sgt-dark-gray);
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.standings-table tbody tr.odd .points {
    border-left: 1px solid var(--sgt-dark-gray);
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.standings-table tbody tr.even .position {
    border-right: 1px solid var(--sgt-md-gray);
}

.standings-table tbody tr.even .points {
    border-left: 1px solid var(--sgt-md-gray);
}

@media (max-width: 768px) {

    .standings-table {
        font-size: 60%;
    }

    .standings-table .three-quarter-font {
        font-size: 75% !important;
    }

}
