/**
 * Subnav „Kategorien desk“ (Übersicht, Fußball, Eishockey, International + Länder-Panel)
 */

/* Abstand Hauptnav → Subnav (Figma-ähnlich; horizontales Padding kommt vom inneren 97%/max-width) */
.ff-content-wrap .ff-subnav-wrap {
    margin-top: 6px;
}

.ff-subnav-wrap {
    width: 100%;
    background: #fff;
    box-sizing: border-box;
}

/* Vertikal: Figma padding oben 34px / unten 11px – unten knapp, damit weniger Lücke zum Karussell */
.ff-subnav-inner {
    position: relative;
    max-width: 1360px;
    width: 97%;
    margin: 0 auto;
    padding: clamp(18px, 2.5vw, 28px) 0 11px;
    box-sizing: border-box;
}

.ff-home-subnav.ff-sn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0;
    margin: 0;
    border: none;
    width: 100%;
    box-sizing: border-box;
}

.ff-sn .ff-home-subnav-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 25px;
    min-height: 28px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.ff-sn .ff-home-subnav-left::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.ff-sn .ff-home-subnav-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 16px;
}

/* Basis-Item (Links / Buttons) */
.ff-sn .ff-sn-item,
.ff-sn a.ff-sn-item,
.ff-sn button.ff-sn-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    /* Kein min-height: sonst zentriert der Text in der Box und der rote Strich wirkt weit unter der Zeile (Figma: Balken dicht unter dem Text). */
    min-height: 0;
    font-family: 'Barlow Semi Condensed', sans-serif;
    /* wie Hauptnav (.ff-main-nav .ff-menu a) */
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 500;
    line-height: 24px;
    color: #000;
    text-decoration: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
    padding-bottom: 0;
}

.ff-sn a.ff-sn-item:hover,
.ff-sn button.ff-sn-item:hover {
    color: #000;
}

.ff-sn .ff-sn-item.is-active {
    color: #000 !important;
    font-weight: 700;
    border-bottom-color: #b43526 !important;
}

/* Chevron: zu = nach unten; aufgeklappt = nach rechts */
.ff-sn-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.ff-sn-chevron svg {
    display: block;
    width: 10.5px;
    height: 5px;
}

.ff-sn-group.is-expanded > .ff-sn-sport-btn .ff-sn-chevron {
    transform: rotate(-90deg);
}

.ff-sn-sport-btn {
    -webkit-appearance: none;
    appearance: none;
}

.ff-sn-sport-btn:focus,
.ff-sn-int-btn:focus {
    outline: none;
}

.ff-sn-sport-btn:focus-visible,
.ff-sn-int-btn:focus-visible {
    outline: 2px solid #B43526;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Gruppe: Sport + inline Kinder */
.ff-sn-group {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 25px;
    flex-shrink: 0;
}

.ff-sn-children {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 25px;
}

.ff-sn-group.is-expanded .ff-sn-children {
    display: inline-flex;
}

.ff-sn-int {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ff-sn-int-btn .ff-sn-chevron svg {
    width: 8px;
    height: 4px;
}

.ff-sn-int.is-open > .ff-sn-int-btn .ff-sn-chevron {
    transform: rotate(-90deg);
}

/* Mein FF */
.ff-sn .ff-home-subnav-meinff-label {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 500;
    line-height: 24px;
    color: #000;
}

.ff-sn .ff-home-subnav-toggle-wrap {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.ff-sn .ff-home-subnav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.ff-sn .ff-home-subnav-toggle-slider {
    display: block;
    width: 38px;
    height: 18px;
    background: #e0e0e3;
    border-radius: 9px;
    position: relative;
    transition: background 0.2s ease;
}

.ff-sn .ff-home-subnav-toggle-slider::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: #2b2b2b;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.ff-sn .ff-home-subnav-toggle:checked + .ff-home-subnav-toggle-slider {
    background: #b43526;
}

.ff-sn .ff-home-subnav-toggle:checked + .ff-home-subnav-toggle-slider::after {
    transform: translateX(-20px);
}

/* Länder-Panel (Figma: weiß, Schatten, schmale Scrollspalte) */
.ff-sn-lands-panel {
    position: absolute;
    z-index: 300;
    display: none;
    flex-direction: row;
    align-items: stretch;
    gap: 13px;
    min-width: 160px;
    max-width: 220px;
    padding: 4px 10px 8px 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-radius: 1px;
    box-sizing: border-box;
}

.ff-sn-lands-panel.is-open {
    display: flex;
}

.ff-sn-lands-scroll {
    flex: 1;
    min-width: 0;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 4px 0 0;
    scrollbar-width: thin;
    scrollbar-color: #000 #d9d9d9;
}

.ff-sn-lands-scroll::-webkit-scrollbar {
    width: 7px;
}

.ff-sn-lands-scroll::-webkit-scrollbar-track {
    background: #d9d9d9;
    border-radius: 3.5px;
}

.ff-sn-lands-scroll::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 3.5px;
}

.ff-sn-land-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 15px;
    line-height: 18px;
    font-weight: 400;
    color: #313131;
    margin: 0;
    padding: 0;
    user-select: none;
}

.ff-sn-land-row input {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    accent-color: #b43526;
    cursor: pointer;
}

.ff-sn-land-all {
    font-weight: 600;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
    margin-bottom: 2px;
}

.ff-sn-lands-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    margin-top: 4px;
    border-top: 1px solid #eee;
}

.ff-sn-lands-apply {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 10px;
    background: #b43526;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.ff-sn-lands-apply:hover {
    background: #8f2a1f;
}

@media (max-width: 560px) {
    .ff-sn .ff-home-subnav-left,
    .ff-sn-group {
        gap: 16px;
    }

    .ff-sn-group.is-expanded .ff-sn-children {
        gap: 12px;
    }
}
