/* ============================================================
   HOMEPAGE — pristine, slightly different but compatible
   ============================================================ */
body.theme-apple .apl-home {
    min-height: calc(100dvh - 80px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(40px, 8vw, 96px) 20px clamp(32px, 6vw, 64px);
    text-align: center;
}
body.theme-apple .apl-home-eyebrow {
    color: var(--ios-fg-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
body.theme-apple .apl-home-logo { margin: 0 0 8px; }
body.theme-apple .apl-home-logo .effepadelle-logo {
    filter: brightness(0) saturate(100%);
    max-width: 320px;
    width: 100%;
    height: auto;
}
body.theme-apple .apl-home-title {
    margin: 0 auto 18px;
    max-width: 720px;
    color: var(--ios-fg);
    font-size: clamp(42px, 7vw, 64px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.04;
}
body.theme-apple .apl-home-tagline {
    margin: 0 auto 36px;
    max-width: 500px;
    color: var(--ios-fg-2);
    font-size: 17px;
    line-height: 1.45;
}
body.theme-apple .apl-home-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

/* Primary on home — iOS-native solid black pill */
body.theme-apple .apl-home-cta a#login-btn.btn.btn-primary.homepage-button {
    background: var(--ios-fg);
    background-color: var(--ios-fg);
    background-image: none;
    border: none;
    border-radius: 14px;
    padding: 16px 28px;
    min-height: 50px;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: #FFFFFF;
    box-shadow: none;
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity 180ms ease;
}
body.theme-apple .apl-home-cta a#login-btn:active {
    transform: scale(0.97);
    opacity: 0.85;
}

body.theme-apple .apl-home-cta a#register-btn.btn.btn-outline-primary.homepage-button {
    background: var(--ios-surface);
    background-color: var(--ios-surface);
    background-image: none;
    border: 1px solid var(--ios-separator);
    border-radius: 14px;
    padding: 16px 28px;
    min-height: 50px;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    color: var(--ios-fg);
    box-shadow: none;
}
body.theme-apple .apl-home-cta a#register-btn:active {
    background: var(--ios-surface-press);
    transform: scale(0.97);
}

body.theme-apple .apl-home-faq-link {
    margin-top: 24px;
    color: var(--ios-tint);
    font-size: 15px;
    font-weight: 500;
}

body.theme-apple .apl-home-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 48px;
    width: 100%;
    max-width: 720px;
    padding: 0 4px;
}
@media (max-width: 540px) {
    body.theme-apple .apl-home-features { grid-template-columns: 1fr; gap: 8px; }
}
body.theme-apple .apl-home-feature {
    background: var(--ios-surface);
    border: 1px solid var(--ios-separator-soft);
    border-radius: var(--ios-radius-lg);
    padding: 18px 16px;
    text-align: left;
    box-shadow: 0 1px 0 var(--ios-separator-soft);
}
body.theme-apple .apl-home-feature-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--ios-tint-soft);
    color: var(--ios-tint);
    margin-bottom: 12px;
}
body.theme-apple .apl-home-feature-title {
    font-size: 15px; font-weight: 600; color: var(--ios-fg);
    letter-spacing: -0.01em; margin: 0 0 2px;
}
body.theme-apple .apl-home-feature-text {
    font-size: 13px; color: var(--ios-fg-2); line-height: 1.4; margin: 0;
}
body.theme-apple .add-to-homescreen-btn {
    background: var(--ios-fg); color: #fff;
    border-radius: 999px; border: none;
    box-shadow: none; font-weight: 600;
    padding: 10px 18px;
}

/* ============================================================
   COMPETITIONS DASHBOARD — native iOS reimagined
   ============================================================ */

/* Kill the dark parallax moon — no place in iOS native */
body.theme-apple #parallax-moon { display: none; }

/* Container spacing — iOS uses generous left/right padding */
body.theme-apple .container.mt-2.pt-2,
body.theme-apple #tab-container,
body.theme-apple #tab-container > .tab-slot,
body.theme-apple #ios-dash,
body.theme-apple #competitions-content {
    background: transparent;
    background-color: transparent;
    background-image: none;
}

body.theme-apple #competitions-content {
    padding-top: clamp(8px, 2vw, 16px);
    padding-bottom: 120px;
}

/* ============================================================
   New iOS dashboard chrome (replaces pending-bar +
   join-container-header). Markup is added in list.html.
   ============================================================ */

/* Legacy hide-when-iOS-chrome rule removed 2026-07-15.
   `.pending-bar` and `#fixed-join-btn-container` were fully deleted
   from templates/competitions/list.html — no CSS hide gate needed.
   `.join-container-header` is now the wrapper for the ACTIVE new
   header, so hiding it was actively wrong when the body class
   toggled off during SPA re-renders. */

/* Large iOS title header */
body.theme-apple .ios-dash-header {
    padding: 8px 16px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
body.theme-apple .ios-dash-title {
    font-size: clamp(28px, 6.5vw, 34px);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.06;
    color: var(--ios-fg);
    margin: 0;
}
body.theme-apple .ios-dash-subtitle {
    color: var(--ios-fg-2);
    font-size: 15px;
    margin: 2px 0 0;
    font-weight: 500;
    letter-spacing: -0.005em;
}

/* Round icon button in the top-right of header (sort) */
body.theme-apple .ios-icon-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--ios-fg-4);
    border: none;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ios-fg);
    cursor: pointer;
    transition: background 180ms ease, transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
body.theme-apple .ios-icon-btn:active { transform: scale(0.92); background: var(--ios-fg-3); }
body.theme-apple .ios-icon-btn svg { width: 18px; height: 18px; }

/* iOS stat tile row — three Fitness-style tiles */
body.theme-apple .ios-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 8px 16px 16px;
}
/* Match text-hover-improvements.css :not() chain to win the cascade. */
body.theme-apple a.ios-stat:not(.btn):not(.badge):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.mobile-nav-item),
body.theme-apple a.ios-stat,
body.theme-apple .ios-stat {
    background: var(--ios-surface);
    background-color: var(--ios-surface);
    background-image: none;
    border: 0.5px solid var(--ios-separator-soft);
    border-radius: var(--ios-radius-lg);
    padding: 14px 12px;
    text-decoration: none;
    color: var(--ios-fg);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 4px 14px rgba(0,0,0,0.04);
    transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
                background 180ms ease;
}
body.theme-apple a.ios-stat:active,
body.theme-apple .ios-stat:active {
    transform: scale(0.97);
    background: var(--ios-surface-press);
}
/* iOS widget pattern: icon stacked ABOVE label so the label has the
   full tile width to itself — no more "Beschikbaarheid" sharing space
   with the icon and orphaning a letter on the next line. */
body.theme-apple .ios-stat-icon-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    color: var(--ios-fg-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: capitalize;
    line-height: 1.15;
    text-align: center;
    min-width: 0;
}
body.theme-apple .ios-stat-icon-row > span {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;       /* on a clean tile no wrap is needed */
    overflow: hidden;
    text-overflow: clip;       /* visually balanced if it still doesn't fit */
    text-wrap: balance;
}
body.theme-apple .ios-stat-icon {
    width: 18px;
    height: 18px;
    color: var(--ios-tint);
    flex: 0 0 18px;            /* fixed size — never shrinks */
}
/* Center the number under the label for the same vertical rhythm. */
body.theme-apple .ios-stat-num {
    text-align: center;
}
body.theme-apple .ios-stat {
    align-items: center;   /* keep the column centered as a whole */
}

/* Small screens: drop label font just enough to keep one line for the
   longest Dutch word ("Beschikbaarheid") without orphans. */
@media (max-width: 420px) {
    body.theme-apple .ios-stats {
        gap: 8px;
        padding: 8px 12px 14px;
    }
    body.theme-apple .ios-stat {
        padding: 12px 8px;
    }
    body.theme-apple .ios-stat-icon-row {
        font-size: 11px;
        letter-spacing: -0.01em;
    }
    body.theme-apple .ios-stat-num {
        font-size: 26px;
    }
}
@media (max-width: 360px) {
    body.theme-apple .ios-stat-icon-row {
        font-size: 10px;
        letter-spacing: -0.015em;
    }
    body.theme-apple .ios-stat-num {
        font-size: 22px;
    }
}
body.theme-apple .ios-stat-num {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--ios-fg);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* iOS primary action bar — full-width pill + secondary link */
body.theme-apple .ios-actions {
    padding: 4px 16px 18px;
    display: flex; flex-direction: column; gap: 10px;
}
body.theme-apple a.ios-cta-primary:not(.btn):not(.badge):not(.nav-link):not(.navbar-brand):not(.dropdown-item):not(.mobile-nav-item),
body.theme-apple a.ios-cta-primary,
body.theme-apple .ios-cta-primary {
    background: var(--ios-fg);
    background-color: var(--ios-fg);
    background-image: none;
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    padding: 14px 22px;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    width: 100%;
    box-shadow: none;
    transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
                opacity 180ms ease;
}
body.theme-apple a.ios-cta-primary:active,
body.theme-apple .ios-cta-primary:active {
    transform: scale(0.98); opacity: 0.85;
}
body.theme-apple .ios-cta-primary svg { width: 18px; height: 18px; }

body.theme-apple a.ios-cta-secondary,
body.theme-apple .ios-cta-secondary,
body.theme-apple a.ios-cta-secondary:hover,
body.theme-apple a.ios-cta-secondary:focus,
body.theme-apple a.ios-cta-secondary:focus-visible,
body.theme-apple a.ios-cta-secondary:visited,
body.theme-apple .ios-cta-secondary:hover,
body.theme-apple .ios-cta-secondary:focus,
body.theme-apple .ios-cta-secondary:focus-visible {
    /* new-dark.css has `a:focus { color: rgba(--bs-primary-rgb, 0.85) }`
       which turned this link white after the Join modal closed and the
       link still had focus. Explicit color on every state wins. */
    color: var(--ios-tint);
    font-weight: 500;
    font-size: 15px;
    text-align: center;
    text-decoration: none;
    padding: 8px;
    background: transparent;
    display: block;
    outline: none;
}
body.theme-apple a.ios-cta-secondary:active,
body.theme-apple .ios-cta-secondary:active { opacity: 0.6; }

/* iOS section header (uppercase, small, grey) */
body.theme-apple .ios-section-header {
    padding: 14px 16px 6px;
    color: var(--ios-fg-2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ============================================================
   COMPETITION CARDS — iOS-list / tile hybrid
   ============================================================ */

/* The grid container holding the JS-rendered cards */
body.theme-apple #competitions-row {
    padding: 0 16px;
    gap: 10px;
}

/* Each <div class="col"> wrapping a card — make padding tight */
body.theme-apple #competitions-row > [class*="col"] {
    padding: 0;
}

/* ── iOS-style competition card (beats all previous .card rules) ── */
body.theme-apple .card:not(.competition-header):not(.join-container-header):not(#upcoming-matches-container .card):not(#completed-matches-container .card):not(.create-competition-card),
body.theme-apple div.competition-card,
body.theme-apple .card.competition-card,
body.theme-apple .card.h-100.w-100.competition-card,
body.theme-apple .card.h-100.competition-card,
body.theme-apple .competition-card,
body.theme-apple .card.folder-card-inner.competition-card,
body.theme-apple .card.folder-card-inner,
body.theme-apple .folder-card-inner.competition-card,
body.theme-apple #competitions-row .col .card.competition-card,
body.theme-apple #competitions-row .col .card.competition-card:not(.folder-card-inner) {
    background: var(--ios-surface);
    background-color: var(--ios-surface);
    background-image: none;
    border: 0.5px solid var(--ios-separator-soft);
    border-radius: var(--ios-radius-lg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.02),
        0 4px 14px rgba(0, 0, 0, 0.04);
    color: var(--ios-fg);
    overflow: hidden;
    transition:
        transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
        background 160ms ease,
        box-shadow 200ms ease;
}

body.theme-apple .competition-card:active,
body.theme-apple .folder-card-inner:active,
body.theme-apple div.competition-card:active {
    transform: scale(0.985);
    background: var(--ios-surface-hover);
    background-color: var(--ios-surface-hover);
}

body.theme-apple .competition-card .card-body,
body.theme-apple .folder-card-inner .card-body,
body.theme-apple #competitions-row .card-body {
    background: transparent;
    background-color: transparent;
    color: var(--ios-fg);
    padding: 14px;
    padding-right: 40px; /* room for ⋮ menu */
}

/* Matches columns — symmetric padding (not competition ⋮ menu offset) */
body.theme-apple .matches-card-with-header > .card-body,
body.theme-apple #upcoming-matches-container .card-body,
body.theme-apple #completed-matches-container .card-body {
    padding: 14px;
}

body.theme-apple a.competition-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    width: 100%;
}

body.theme-apple a.competition-link:hover,
body.theme-apple a.competition-link:focus,
body.theme-apple a.competition-link:active {
    color: inherit;
}

body.theme-apple .competition-card .card-title,
body.theme-apple .folder-card-inner .card-title,
body.theme-apple .competition-card-title,
body.theme-apple .folder-card-title,
body.theme-apple .competition-card h5,
body.theme-apple .folder-card-inner h5 {
    color: var(--ios-fg);
    font-weight: 600;
    letter-spacing: -0.015em;
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 4px;
}

body.theme-apple .competition-card *,
body.theme-apple .folder-card-inner * {
    color: var(--ios-fg);
}
body.theme-apple .competition-card .text-muted,
body.theme-apple .competition-card small,
body.theme-apple .competition-card p,
body.theme-apple .folder-card-inner .text-muted,
body.theme-apple .folder-card-inner small,
body.theme-apple .folder-card-inner p,
body.theme-apple a.competition-link .text-muted,
body.theme-apple a.competition-link small.text-muted,
body.theme-apple .competition-card .competition-date {
    color: var(--ios-fg-2) !important;
    background: transparent !important;
    background-color: transparent !important;
    -webkit-text-fill-color: currentColor;
    font-size: 13px;
    opacity: 1;
}

body.theme-apple .competition-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

/* Three-dot menu — inside card top-right */
body.theme-apple #competitions-row .competition-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
}

body.theme-apple #competitions-row .competition-card-menu .dropdown-toggle,
body.theme-apple #competitions-row .competition-card-menu .btn-link {
    padding: 4px !important;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ios-fg-2) !important;
}

body.theme-apple #competitions-row .competition-card-menu [data-feather="more-vertical"] {
    width: 20px !important;
    height: 20px !important;
    color: var(--ios-fg-2) !important;
    stroke: var(--ios-fg-2) !important;
}

/* Demo competition — subtle iOS yellow tag accent */
body.theme-apple div.competition-card.demo-competition-card,
body.theme-apple .demo-competition-card {
    border: 0.5px solid rgba(255, 204, 0, 0.4);
}

/* Spectator card — blue tint border */
body.theme-apple .competition-card.spectator-card {
    border: 0.5px solid rgba(0, 122, 255, 0.35);
}

/* "Create" tile — iOS-native dashed border + blue plus icon */
body.theme-apple .create-competition-card,
body.theme-apple .card.competition-card.create-competition-card,
body.theme-apple div.competition-card.create-competition-card,
body.theme-apple #competitions-row .col .card.create-competition-card,
body.theme-apple #competitions-row .col .card.competition-card.create-competition-card,
body.theme-apple #competitions-row .col .create-competition-card {
    background: transparent;
    background-color: transparent;
    background-image: none;
    border: 1.5px dashed var(--ios-tint);
    border-radius: var(--ios-radius-lg);
    box-shadow: none;
    color: var(--ios-tint);       /* drives `currentColor` on the plus icon */
}
body.theme-apple .create-competition-card:active {
    background: var(--ios-tint-soft);
    border-color: var(--ios-tint);
}
/* Plus icon — explicit iOS blue, beat the peach overrides */
body.theme-apple .create-competition-card .plus-icon,
body.theme-apple .create-competition-card svg,
body.theme-apple .create-competition-card svg * {
    color: var(--ios-tint);
    stroke: var(--ios-tint);
    fill: none;
    opacity: 1;
}

/* Badge positioning kept */
body.theme-apple .competition-card .badge-container {
    bottom: 10px;
    right: 10px;
}

/* ============================================================
   BADGES — iOS tag style
   ============================================================ */
body.theme-apple .badge {
    font-weight: 600;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    letter-spacing: 0;
}
body.theme-apple .badge.bg-primary,
body.theme-apple .badge.bg-info {
    background: var(--ios-tint-soft);
    color: var(--ios-tint);
    border: none;
}
body.theme-apple .badge.bg-success {
    background: rgba(52, 199, 89, 0.18);
    color: #248A3D;
    border: none;
}
body.theme-apple .badge.bg-warning {
    background: rgba(255, 149, 0, 0.18);
    color: #B25700;
    border: none;
}
body.theme-apple .badge.bg-danger {
    background: rgba(255, 59, 48, 0.16);
    color: #B2251D;
    border: none;
}
body.theme-apple .badge.bg-secondary {
    background: var(--ios-fg-4);
    color: var(--ios-fg-2);
    border: none;
}

/* ============================================================
   Card role badges (host / member / demo / folder / spectator)
   iOS-native chip: soft pastel bg + matching tint text,
   pill shape, no shadow, no text-shadow, no gradient.
   ============================================================ */
body.theme-apple .badge.badge-host,
body.theme-apple .badge.badge-member,
body.theme-apple .badge.badge-demo,
body.theme-apple .badge.badge-folder,
body.theme-apple .badge.badge-spectator {
    background: transparent;
    background-image: none;
    border: none;
    text-shadow: none;
    box-shadow: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.01em;
    line-height: 1;
    padding: 5px 10px;
    width: auto;
    min-width: 60px;
    display: inline-block;
    text-align: center;
}

/* Host — iOS purple (distinguished owner) */
body.theme-apple .badge.badge-host {
    background: rgba(175, 82, 222, 0.14);
    background-color: rgba(175, 82, 222, 0.14);
    color: #8E3AB8;
}

/* Member — iOS blue (system tint) */
body.theme-apple .badge.badge-member {
    background: rgba(0, 122, 255, 0.12);
    background-color: rgba(0, 122, 255, 0.12);
    color: var(--ios-tint);
}

/* Demo — iOS orange (temporary / example) */
body.theme-apple .badge.badge-demo {
    background: rgba(255, 149, 0, 0.16);
    background-color: rgba(255, 149, 0, 0.16);
    color: #B25700;
}

/* Folder — iOS indigo (grouping) */
body.theme-apple .badge.badge-folder {
    background: rgba(88, 86, 214, 0.14);
    background-color: rgba(88, 86, 214, 0.14);
    color: #3D3BAB;
}

/* Spectator — iOS teal (viewer) */
body.theme-apple .badge.badge-spectator {
    background: rgba(48, 176, 199, 0.14);
    background-color: rgba(48, 176, 199, 0.14);
    color: #1E7F92;
}

/* ============================================================
   BOTTOM TAB BAR — high-contrast iOS Tab Bar
   ============================================================ */
body.theme-apple .mobile-navbar.bottom-nav-floating {
    background: rgba(255, 255, 255, 0.85);
    background-color: rgba(255, 255, 255, 0.85);
    border: 0.5px solid var(--ios-separator);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
}

/* Icons VISIBLE — dark medium grey by default, system blue for active.
   Beats theme-overrides.css `.mobile-nav-item svg { color: rgba(255,255,255,0.5); stroke: ... }` */
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item,
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item i {
    color: rgba(60, 60, 67, 0.60);
}
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item svg,
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item i svg,
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item div svg {
    color: rgba(60, 60, 67, 0.60);
    stroke: rgba(60, 60, 67, 0.60);
    fill: none;
    stroke-width: 2.2;
    opacity: 1;
}
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item.active {
    color: var(--ios-tint);
}
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item.active svg,
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item.active i svg,
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item.active div svg {
    color: var(--ios-tint);
    stroke: var(--ios-tint);
    transform: scale(1.05);
}
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item.active i {
    color: var(--ios-tint);
}

/* Active "pill" indicator behind active icon — light blue tint */
body.theme-apple .bottom-nav-indicator {
    background: var(--ios-tint-soft);
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Allow the badge to overflow OUT of the icon area on EVERY nav item.
   Beats chat-push-animation.css `[href*="/chat"] { overflow: hidden }` (0,1,0)
   which was clipping the badge on the Berichten icon. */
body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item,
body.theme-apple .mobile-nav-item[href*="/chat"],
body.theme-apple a.mobile-nav-item[href*="/chat"],
body.theme-apple .mobile-nav-item .position-relative {
    overflow: visible;
}

/* Notification badge — iOS red, half-overlapping icon's top-right corner.
   Beats custom.css `#chat-notification-badge` (1,0,0). Uses flex for true
   centering of the digit. `:not(.d-none)` lets Bootstrap's d-none hide the
   badge when count is zero. */
body.theme-apple .bottom-nav-badge:not(.d-none),
body.theme-apple #chat-notification-badge:not(.d-none),
body.theme-apple #competition-notification-badge:not(.d-none),
body.theme-apple .mobile-nav-item .bottom-nav-badge:not(.d-none) {
    /* Color */
    background: var(--ios-red);
    background-color: var(--ios-red);
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
    box-shadow: none;

    /* Position: top-right corner of icon, half-overlapping outwards */
    position: absolute;
    top: -4px;
    right: -6px;
    bottom: auto;
    left: auto;

    /* Size: larger, circular */
    min-width: 20px;
    height: 20px;
    width: auto;
    padding: 0 5px;
    border-radius: 999px;

    /* Center the digit with flex (true centering, no line-height hack) */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    /* Typography */
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    box-sizing: border-box;

    /* Float above everything (icon, nav glass) so it never gets clipped */
    z-index: 10;
}

/* When the badge has d-none (no notifications) keep it hidden.
   Includes ID-prefixed versions to win over my own (1,2,1) ID rules. */
body.theme-apple .bottom-nav-badge.d-none,
body.theme-apple #chat-notification-badge.d-none,
body.theme-apple #competition-notification-badge.d-none,
body.theme-apple .mobile-nav-item .bottom-nav-badge.d-none {
    display: none;
}

/* ============================================================
   Bottom nav structure — layout/positioning (Apple theme)
   ============================================================ */
body.theme-apple .bottom-nav-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.theme-apple .mobile-navbar.bottom-nav-floating {
    left: 50%;
    right: auto;
    bottom: calc(var(--ep-safe-bottom) + var(--ep-nav-bottom-offset));
    transform: translateX(-50%) scale(1);
    transform-origin: center bottom;
    width: calc(100% - var(--ep-space-4));
    max-width: 520px;
    height: var(--ep-nav-height);
    padding: var(--ep-space-2) 18px;
    border-radius: var(--ep-radius-pill);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: var(--ep-z-fixed);
    transition:
        transform var(--ep-motion-base) var(--ep-ease-out),
        opacity var(--ep-motion-base) var(--ep-ease-out);
}

body.theme-apple .mobile-navbar.bottom-nav-floating.nav-compact {
    transform: translateX(-50%) scale(0.82);
}

body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: var(--ep-radius-pill);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
    font-size: 0;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
}

body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item svg {
    width: 27px;
    height: 27px;
    stroke-width: 2.1;
    flex-shrink: 0;
}

body.theme-apple .bottom-nav-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    width: 68px;
    height: 50px;
    border-radius: var(--ep-radius-pill);
    transform: translate(0, -50%);
    transition: transform var(--ep-motion-slow) var(--ep-ease-spring);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    will-change: transform;
}

body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item span:not(.bottom-nav-badge):not(.bottom-nav-sr-only) {
    display: none;
}

body.theme-apple .mobile-navbar.bottom-nav-floating .mobile-nav-item .badge:not(.bottom-nav-badge) {
    display: none;
}

@media (max-width: 1199.98px) {
    body.theme-apple {
        padding-bottom: calc(96px + var(--ep-safe-bottom));
    }
}

@media (min-width: 1200px) {
    body.theme-apple .mobile-navbar.bottom-nav-floating {
        display: none;
    }
}
