/* Team Roster — accordion cards (reference-matched profile card) */

.roster-accordion-section {
    background: #fff;
}

.roster-title-wrap {
    text-align: center;
    margin-bottom: 32px;
}

.roster-title-wrap .section-title {
    margin-bottom: 14px;
}

.roster-title-accent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto 28px;
}

.roster-title-accent span {
    display: block;
    width: 3px;
    height: 22px;
    background: var(--primary-red, #c62828);
    border-radius: 2px;
    opacity: 0.9;
}

.roster-title-accent span:nth-child(2) {
    height: 28px;
    opacity: 1;
}

.roster-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: 960px;
    margin: 0 auto;
}

.roster-position-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.roster-position-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 4px 10px;
    border-bottom: 2px solid rgba(198, 40, 40, 0.24);
}

.roster-position-heading h3 {
    margin: 0;
    font-family: var(--font-heading, 'Bebas Neue', sans-serif);
    font-size: 2rem;
    line-height: 1;
    letter-spacing: 0.08em;
    color: #111;
}

.roster-position-heading span {
    min-width: 34px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--primary-red, #c62828);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.roster-position-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.roster-accordion-empty {
    text-align: center;
    color: #666;
    padding: 40px 16px;
    font-size: 0.95rem;
}

.roster-accordion-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.2s ease;
    animation: rosterCardReveal 0.35s ease both;
}

@keyframes rosterCardReveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.roster-accordion-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.14);
}

.roster-accordion-card.is-expanded {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.roster-accordion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border: none;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    transition: background 0.2s ease;
}

.roster-accordion-header:hover {
    background: #fafafa;
}

.roster-accordion-number {
    flex-shrink: 0;
    font-family: var(--font-heading, 'Bebas Neue', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-red, #c41e1e);
    letter-spacing: 0.3px;
    min-width: 36px;
    line-height: 1;
}

.roster-accordion-name {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.2px;
}

.roster-accordion-chevron {
    flex-shrink: 0;
    color: #222;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.roster-accordion-card.is-expanded .roster-accordion-chevron {
    transform: rotate(180deg);
}

.roster-accordion-panel {
    overflow: hidden;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.roster-profile-card {
    margin: 0 10px 10px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-color: #0a0a0c;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(196, 30, 30, 0.55),
        0 4px 24px rgba(0, 0, 0, 0.35);
}

.roster-profile-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.32);
    pointer-events: none;
}

.roster-profile-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    margin: 0;
    padding: 0;
    line-height: 0;
    pointer-events: none;
}

.roster-profile-card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.roster-profile-inner {
    display: flex;
    align-items: stretch;
    gap: 24px;
    padding: 22px 24px 22px 20px;
    position: relative;
    z-index: 1;
    min-height: 220px;
}

.roster-profile-media {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

.roster-player-avatar {
    width: 148px;
    height: 188px;
    border-radius: 6px;
    object-fit: cover;
    object-position: center top;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    background: #e8e8e8;
    display: block;
}

.roster-player-avatar--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #3a2020 0%, #1a1a1e 55%, #101014 100%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 3rem;
}

.roster-profile-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-top: 4px;
}

.roster-profile-name {
    font-family: var(--font-heading, 'Bebas Neue', sans-serif);
    font-size: 2.15rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    line-height: 1;
}

.roster-profile-name-accent {
    width: 68px;
    height: 4px;
    background: var(--primary-red, #c41e1e);
    margin: 10px 0 22px;
    border-radius: 1px;
}

.roster-profile-data {
    display: flex;
    align-items: stretch;
    flex: 1;
}

.roster-profile-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.roster-profile-col-divider {
    width: 2px;
    flex-shrink: 0;
    background: var(--primary-red, #c41e1e);
    margin: 2px 22px 2px;
    align-self: stretch;
    opacity: 0.95;
}

.roster-profile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.roster-profile-row-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.roster-profile-row-label i {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    color: #E00000;
    font-size: 0.82rem;
}

.roster-profile-svg-icon {
    flex-shrink: 0;
    width: 18px;
    height: 14px;
    color: #E00000;
}

.roster-profile-row-label span {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    white-space: nowrap;
}

.roster-profile-row-value {
    flex-shrink: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    text-align: right;
    letter-spacing: 0.3px;
}

.roster-profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.roster-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.roster-action-btn:hover {
    background: rgba(196, 30, 30, 0.45);
    border-color: rgba(196, 30, 30, 0.65);
}

.roster-action-delete:hover {
    background: rgba(196, 30, 30, 0.65);
}

.roster-accordion-card.roster-search-highlight {
    animation: rosterSearchPulse 2.5s ease;
    outline: 2px solid rgba(196, 30, 30, 0.85);
    outline-offset: 2px;
    box-shadow: 0 0 18px rgba(196, 30, 30, 0.35);
}

#manage-roster .roster-title-wrap .section-title {
    font-size: 2.2rem;
    color: var(--ui-text, #fff);
}

#manage-roster .roster-title-wrap .section-title .red-text {
    color: var(--ui-red, #c62828);
}

#manage-roster .roster-accordion-section-inner {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

#manage-roster .roster-manage-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.roster-image-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.roster-image-remove-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: 1px solid rgba(198, 40, 40, 0.4);
    background: transparent;
    color: var(--primary-red, #c62828);
    cursor: pointer;
    transition: background 0.2s ease;
}

.roster-image-remove-btn:hover {
    background: rgba(198, 40, 40, 0.08);
}

@media (max-width: 599px) {
    .roster-profile-card {
        min-height: 380px;
    }

    .roster-profile-card-bg-img {
        object-position: center bottom;
    }
}

@media (max-width: 768px) {
    .roster-profile-inner {
        flex-direction: column;
        align-items: center;
        padding: 20px 18px;
        gap: 18px;
    }

    .roster-profile-content {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .roster-profile-name-accent {
        margin-left: auto;
        margin-right: auto;
    }

    .roster-profile-data {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .roster-profile-col-divider {
        width: 100%;
        height: 2px;
        margin: 16px 0;
    }

    .roster-profile-col {
        width: 100%;
    }

    .roster-profile-actions {
        justify-content: center;
    }

    .roster-player-avatar {
        width: 130px;
        height: 165px;
    }

    .roster-profile-name {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .roster-accordion-header {
        padding: 12px 14px;
        gap: 10px;
    }

    .roster-accordion-number {
        font-size: 1.1rem;
        min-width: 30px;
    }

    .roster-accordion-name {
        font-size: 0.95rem;
    }

    .roster-profile-card {
        margin: 0 6px 6px;
    }

    .roster-profile-row-label span {
        font-size: 0.58rem;
    }

    .roster-profile-row-value {
        font-size: 0.88rem;
    }
}

/* Team Roster — shared language toggle (Home + Public dashboards) */
.home-roster-section-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    min-height: 40px;
}

.home-roster-lang-switch {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border-radius: 8px;
}

.home-roster-lang-switch .lang-switch-btn {
    min-width: 36px;
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.home-roster-lang-switch .lang-switch-btn.active {
    background: var(--primary-red, #c62828);
    color: #fff;
}

#manage-roster .home-roster-section-toolbar {
    justify-content: flex-start;
    margin-bottom: 10px;
}

#manage-roster .home-roster-lang-switch {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

#manage-roster .home-roster-lang-switch .lang-switch-btn {
    color: rgba(255, 255, 255, 0.72);
}

#manage-roster .home-roster-lang-switch .lang-switch-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#manage-roster .roster-position-heading {
    border-bottom-color: rgba(198, 40, 40, 0.36);
}

#manage-roster .roster-position-heading h3 {
    color: #fff;
}

#roster-page .home-roster-lang-switch {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#roster-page .home-roster-lang-switch .lang-switch-btn {
    color: #555;
}

#roster-page .home-roster-lang-switch .lang-switch-btn.active {
    background: var(--primary-red, #c62828);
    color: #fff;
}

#roster-page .home-roster-lang-switch .lang-switch-btn:hover:not(.active) {
    background: rgba(0, 0, 0, 0.06);
    color: #222;
}

#roster-page #public-add-player-btn {
    position: static;
    flex-shrink: 0;
}

/* Public Dashboard — TEAM ROSTER title (reference-matched, vector-sharp) */
#roster-page .public-roster-title-wrap {
    text-align: center;
    margin-bottom: 32px;
}

#roster-page .public-roster-title {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    font-family: 'Bebas Neue', 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

#roster-page .public-roster-title-team {
    color: #000000;
}

#roster-page .public-roster-title-roster {
    margin-left: 0.28em;
    color: #990000;
}

#roster-page .public-roster-title-rule {
    display: block;
    width: min(420px, 92vw);
    max-width: 100%;
    height: auto;
    margin: 0 auto 28px;
    overflow: visible;
    shape-rendering: geometricPrecision;
}

@media (max-width: 767px) {
    .roster-accordion-list {
        gap: 34px;
    }

    .roster-position-group {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .roster-position-group + .roster-position-group {
        padding-top: 8px;
        border-top: 1px solid rgba(198, 40, 40, 0.18);
    }

    .roster-position-heading {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 3;
        background: #fff;
        padding: 10px 4px 12px;
        margin: 0 -4px;
    }

    #manage-roster .roster-position-heading {
        background: var(--ui-bg, #161616);
    }

    .roster-position-heading h3 {
        font-size: 1.7rem;
        letter-spacing: 0.1em;
    }

    .roster-position-cards {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 599px) {
    #roster-page .home-roster-section-toolbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    #roster-page .public-roster-title {
        font-size: 3rem;
    }

    #roster-page .public-roster-title-rule {
        width: min(360px, 94vw);
    }
}
