/* =========================================================
   ===============  GLOBAL DARK MODE  =======================
   ========================================================= */

body.dark-mode {
    background-color: #0b0a0f !important;
    color: #f6f6f6 !important;
}

body.dark-mode a {
    color: #e95027 !important;
}

body.dark-mode hr,
body.dark-mode .border,
body.dark-mode .border-top,
body.dark-mode .border-bottom,
body.dark-mode .border-start,
body.dark-mode .border-end {
    border-color: #2a2d33 !important;
}

body.dark-mode .text-muted,
body.dark-mode .text-secondary,
body.dark-mode .def-link,
body.dark-mode .reset-icon-inside,
body.dark-mode .reset-icon {
    color: #808185 !important;
}

body.dark-mode .bg-light,
body.dark-mode .bg-white,
body.dark-mode .bg-secondary-light {
    background-color: #181b20 !important;
}

/* Scrollbar */
body.dark-mode ::-webkit-scrollbar {
    width: 10px;
}
body.dark-mode ::-webkit-scrollbar-track {
    background: #0b0a0f;
}
body.dark-mode ::-webkit-scrollbar-thumb {
    background: #2a2d33;
}
body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #3a3d44;
}

/* =========================================================
   ===================  HEADER MOBILE  ======================
   ========================================================= */

body.dark-mode .appHeader {
    background: #181b20 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
}

body.dark-mode .appHeader .pageTitle,
body.dark-mode .appHeader .headerButton {
    color: #f6f6f6 !important;
}

body.dark-mode .appHeader .left i,
body.dark-mode .appHeader .right i {
    color: #f6f6f6 !important;
}

/* =========================================================
   ===================  BOTTOM MENU  ========================
   ========================================================= */

body.dark-mode .appBottomMenu {
    background: #181b20 !important;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.6) !important;
}

body.dark-mode .appBottomMenu .item {
    color: #808185 !important;
}

body.dark-mode .appBottomMenu .item i.bi {
    color: #f6f6f6 !important;
}

body.dark-mode .appBottomMenu .item strong {
    color: #f6f6f6 !important;
}

body.dark-mode .appBottomMenu .item.active strong,
body.dark-mode .appBottomMenu .item.active i.bi {
    color: #e95027 !important;
}

/* =========================================================
   ===================  OFFCANVAS  ==========================
   ========================================================= */

body.dark-mode .offcanvas,
body.dark-mode .offcanvas-header,
body.dark-mode .offcanvas-body {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .offcanvas.action-sheet .offcanvas-header {
    border-bottom: 1px solid #2a2d33 !important;
}

body.dark-mode .offcanvas.action-sheet .offcanvas-title {
    color: #f6f6f6 !important;
}

body.dark-mode .offcanvas.action-sheet .list-group-item {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
    border-color: #2a2d33 !important;
}

body.dark-mode .offcanvas.action-sheet .list-group-item.active {
    background-color: #e95027 !important;
    border-color: #e95027 !important;
    color: #fff !important;
}

body.dark-mode #mobileMenu .mobile-menu-item {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
    border-bottom: 1px solid #2a2d33 !important;
}

body.dark-mode #mobileMenu .mobile-menu-item:hover {
    background-color: #2a2d33 !important;
}

body.dark-mode #mobileMenu .mobile-menu-icon {
    filter: brightness(0.8);
}
/* =========================================================
   ==================  ACCORDION MOBILE  ====================
   ========================================================= */

body.dark-mode .mobile-accordion .accordion-item {
    background-color: #181b20 !important;
    border: 1px solid #2a2d33 !important;
    box-shadow: none !important;
}

body.dark-mode .mobile-accordion .accordion-button {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
    border-color: #2a2d33 !important;
}

body.dark-mode .mobile-accordion .accordion-button:not(.collapsed) {
    background-color: #181b20 !important;
    color: #e95027 !important;
}

body.dark-mode .mobile-accordion .accordion-button:focus {
    box-shadow: none !important;
    border-color: #e95027 !important;
}

body.dark-mode .mobile-accordion .card-body {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

/* Slider dentro accordion */
body.dark-mode .mobile-accordion .splide__slide img {
    filter: brightness(0.85);
}

/* =========================================================
   =====================  CARD PILOTA  ======================
   ========================================================= */

body.dark-mode .card-pilota {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .card-pilota-sfondo {
    background: #2a2d33 !important;
}

body.dark-mode .card-pilota-image {
    background-color: #0b0a0f !important;
    border: 2px solid #2a2d33 !important;
}

body.dark-mode .card-pilota-destra {
    color: #f6f6f6 !important;
}

body.dark-mode .card-pilota-col-barcode {
    background-color: #2a2d33 !important;
}

body.dark-mode .barcode {
    background-image: linear-gradient(
        to bottom,
        #f6f6f6 0px, #f6f6f6 2px,
        #0b0a0f 2px, #0b0a0f 4px,
        #f6f6f6 4px, #f6f6f6 6px,
        #0b0a0f 6px, #0b0a0f 8px,
        #f6f6f6 8px, #f6f6f6 11px,
        #0b0a0f 11px, #0b0a0f 13px,
        #f6f6f6 13px, #f6f6f6 14px,
        #0b0a0f 14px, #0b0a0f 17px,
        #f6f6f6 17px, #f6f6f6 20px,
        #0b0a0f 20px, #0b0a0f 22px,
        #f6f6f6 22px, #f6f6f6 26px,
        #0b0a0f 26px, #0b0a0f 28px,
        #f6f6f6 28px, #f6f6f6 30px,
        #0b0a0f 30px, #0b0a0f 32px,
        #f6f6f6 32px, #f6f6f6 35px,
        #0b0a0f 35px, #0b0a0f 37px,
        #f6f6f6 37px, #f6f6f6 40px,
        #0b0a0f 40px, #0b0a0f 42px,
        #f6f6f6 42px, #f6f6f6 45px,
        #0b0a0f 45px, #0b0a0f 47px,
        #f6f6f6 47px, #f6f6f6 50px,
        #0b0a0f 50px, #0b0a0f 52px,
        #f6f6f6 52px, #f6f6f6 55px,
        #0b0a0f 55px, #0b0a0f 57px,
        #f6f6f6 57px, #f6f6f6 60px,
        #0b0a0f 60px, #0b0a0f 62px,
        #f6f6f6 62px, #f6f6f6 65px,
        #0b0a0f 65px, #0b0a0f 67px,
        #f6f6f6 67px, #f6f6f6 70px,
        #0b0a0f 70px, #0b0a0f 72px,
        #f6f6f6 72px, #f6f6f6 75px,
        #0b0a0f 75px, #0b0a0f 77px,
        #f6f6f6 77px, #f6f6f6 80px,
        #0b0a0f 80px, #0b0a0f 82px,
        #f6f6f6 82px, #f6f6f6 85px,
        #0b0a0f 85px, #0b0a0f 87px,
        #f6f6f6 87px, #f6f6f6 90px,
        #0b0a0f 90px, #0b0a0f 92px,
        #f6f6f6 92px, #f6f6f6 95px,
        #0b0a0f 95px, #0b0a0f 97px,
        #f6f6f6 97px, #f6f6f6 100px
    ) !important;
}

body.dark-mode .card-pilota-retro {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

/* =========================================================
   ======================  CARD CLUB  =======================
   ========================================================= */

body.dark-mode .card-club {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .card-club-sinistra {
    border-right: 4px solid #2a2d33 !important;
}

body.dark-mode .card-club-sinistra::after {
    background-color: #0b0a0f !important;
}

body.dark-mode .card-club-image {
    background-color: #0b0a0f !important;
    border: 2px solid #2a2d33 !important;
}

body.dark-mode .card-club-centrale {
    color: #f6f6f6 !important;
}

body.dark-mode .card-body i {
    color: #808185 !important;
}

body.dark-mode .club-note-overlay {
    background-color: rgba(11, 10, 15, 0.95) !important;
}

body.dark-mode .club-note-box {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
    border: 1px solid #2a2d33 !important;
}

/* =========================================================
   ===================  CARD CAMPIONATO  ====================
   ========================================================= */

body.dark-mode .card-campionato {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .card-campionato-sinistra {
    border-right: 4px solid #2a2d33 !important;
}

body.dark-mode .gare-svolte {
    background-color: #e95027 !important;
    color: #fff !important;
}

body.dark-mode .card-hover:hover {
    background-color: #2a2d33 !important;
}
/* =========================================================
   ==================  TABELLE STACKED  =====================
   ========================================================= */

body.dark-mode .table-responsive-stack.stacked-layout tbody tr {
    background-color: #181b20 !important;
    border: 1px solid #2a2d33 !important;
}

body.dark-mode .table-responsive-stack.stacked-layout td {
    color: #f6f6f6 !important;
}

body.dark-mode .table-responsive-stack.stacked-layout td.row1 {
    background-color: #1a1c1f !important;
}

body.dark-mode .table-responsive-stack.stacked-layout td.row1::before {
    color: #808185 !important;
}

body.dark-mode .table-responsive-stack.stacked-layout td.row2[data-label]::before {
    color: #808185 !important;
}

body.dark-mode .table-responsive-stack.stacked-layout td.stacked-hide {
    display: none !important;
}

/* =========================================================
   ======================  CALENDARIO  ======================
   ========================================================= */

body.dark-mode #calendar {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .fc .fc-toolbar.fc-header-toolbar {
    background-color: #181b20 !important;
}

body.dark-mode .fc-toolbar-title {
    color: #f6f6f6 !important;
}

body.dark-mode #calendar .fc-toolbar .fc-button {
    background-color: #2a2d33 !important;
    border-color: #2a2d33 !important;
    color: #f6f6f6 !important;
}

body.dark-mode #calendar .fc-toolbar .fc-button:hover,
body.dark-mode #calendar .fc-toolbar .fc-button:focus {
    background-color: #3a3d44 !important;
    border-color: #3a3d44 !important;
}

body.dark-mode #calendar .fc-toolbar .fc-button.fc-button-active {
    background-color: #e95027 !important;
    border-color: #e95027 !important;
    color: #fff !important;
}

body.dark-mode .fc .fc-daygrid-day {
    background-color: #1a1c1f !important;
    border-color: #2a2d33 !important;
}

body.dark-mode .fc .fc-col-header-cell-cushion {
    color: #f6f6f6 !important;
}

body.dark-mode .fc .fc-daygrid-day-number {
    color: #f6f6f6 !important;
}

body.dark-mode .fc .fc-daygrid-more-link {
    color: #e95027 !important;
}

body.dark-mode .fc-list-event-link,
body.dark-mode .fc-list-event-link:hover {
    color: #f6f6f6 !important;
}

body.dark-mode .fc-list-day-cushion {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .fc-list-day-cushion.fc-cell-shaded {
    background-color: #1a1c1f !important;
}

body.dark-mode .fc-list-event-time {
    display: none !important;
}

/* Badge eventi */
body.dark-mode .badge-calendar {
    background-color: #2a2d33 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .badge-club {
    background-color: #808185 !important;
    color: #0b0a0f !important;
}

body.dark-mode .badge-zone {
    background-color: #e95027 !important;
    color: #fff !important;
}

body.dark-mode .badge-ita {
    background-color: #e95027 !important;
    color: #fff !important;
}

/* =========================================================
   ========================  RANKING  ========================
   ========================================================= */

body.dark-mode .ranking-header {
    background-color: #181b20 !important;
    border-bottom: 2px solid #2a2d33 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .header-ranking-wrapper::after {
    background-color: #2a2d33 !important;
}

body.dark-mode .header-ranking-wrapper::before {
    background-color: #e95027 !important;
}

body.dark-mode .ranking-title {
    color: #e95027 !important;
}

body.dark-mode .nav-pills-custom .nav-link {
    color: #f6f6f6 !important;
    background-color: #2a2d33 !important;
}

body.dark-mode .nav-pills-custom .nav-link.active {
    background-color: #e95027 !important;
    color: #fff !important;
}

body.dark-mode .ranking-club-title {
    color: #e95027 !important;
}
/* =========================================================
   ========================  LOGIN  =========================
   ========================================================= */

body.dark-mode .login-overlay {
    background: #0b0a0f !important;
    backdrop-filter: blur(6px) !important;
}

body.dark-mode .login-card {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
    border: 1px solid #2a2d33 !important;
    box-shadow: 0 0 30px rgba(0,0,0,0.6) !important;
}

body.dark-mode .login-card label {
    color: #f6f6f6 !important;
}

body.dark-mode .login-card input,
body.dark-mode .login-card select,
body.dark-mode .login-card textarea {
    background-color: #1a1c1f !important;
    border: 1px solid #2a2d33 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .login-card input:focus,
body.dark-mode .login-card select:focus,
body.dark-mode .login-card textarea:focus {
    border-color: #e95027 !important;
    box-shadow: 0 0 0 0.25rem rgba(233, 80, 39, 0.25) !important;
}

body.dark-mode .title-fw::before {
    background-color: #e95027 !important;
}

/* =========================================================
   ======================  SIDEBAR WP  ======================
   ========================================================= */

body.dark-mode #sidebarOffcanvas {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

body.dark-mode #sidebarOffcanvas .widget {
    background-color: #181b20 !important;
    border: 1px solid #2a2d33 !important;
}

body.dark-mode #sidebarOffcanvas .widget ul li {
    border-bottom: 1px solid #2a2d33 !important;
}

body.dark-mode #sidebarOffcanvas .widget ul li a {
    color: #f6f6f6 !important;
}

body.dark-mode #sidebarOffcanvas .widget ul li a:hover {
    color: #e95027 !important;
}

body.dark-mode #sidebarOffcanvas .list-group-item {
    background-color: transparent !important;
    color: #f6f6f6 !important;
}

/* Tag cloud */
body.dark-mode .wp-block-tag-cloud.is-style-outline a {
    background-color: #2a2d33 !important;
    color: #f6f6f6 !important;
}

body.dark-mode .wp-block-tag-cloud.is-style-outline a:hover {
    background-color: #e95027 !important;
    color: #fff !important;
}

/* =========================================================
   =====================  ELEMENTI VARI  ====================
   ========================================================= */

/* Links generici */
body.dark-mode a {
    color: #e95027 !important;
}
body.dark-mode a:hover {
    opacity: 0.85;
}

/* Titoli con barre */
body.dark-mode .title::before {
    background-color: #e95027 !important;
}
body.dark-mode .title::after {
    background-color: #2a2d33 !important;
}

/* Section switch */
body.dark-mode .section-tab {
    border-color: #2a2d33 !important;
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}
body.dark-mode .section-tab.active {
    color: #e95027 !important;
    border-color: #e95027 !important;
}

/* Reset icon */
body.dark-mode .reset-icon,
body.dark-mode .reset-icon-inside {
    color: #808185 !important;
}

/* Skeleton */
body.dark-mode .skeleton-card {
    background-color: #181b20 !important;
}
body.dark-mode .skeleton-line {
    background: linear-gradient(90deg, #2a2d33 25%, #3a3d44 50%, #2a2d33 75%) !important;
}

/* Popup map */
body.dark-mode #map {
    border: 1px solid #2a2d33 !important;
}
body.dark-mode .popup-content {
    color: #f6f6f6 !important;
}
body.dark-mode .popup-content a {
    color: #e95027 !important;
}

/* Calendario badge override */
body.dark-mode .badge-calendar {
    border: 1px solid #2a2d33 !important;
}

/* Card regolamenti */
body.dark-mode .card-body.regolamenti i {
    color: #e95027 !important;
}

/* Area pilota */
body.dark-mode .list-ap .list-group-item {
    background-color: transparent !important;
    color: #f6f6f6 !important;
}
body.dark-mode .list-ap .list-group-item:hover {
    background-color: #2a2d33 !important;
}
body.dark-mode .list-ap .list-group-item.active {
    background-color: #e95027 !important;
    border-color: #e95027 !important;
    color: #fff !important;
}

/* Pilota page */
body.dark-mode .col-pilota-left {
    background-color: #181b20 !important;
}
body.dark-mode .col-pilota-image-wrapper {
    background-color: #2a2d33 !important;
}
body.dark-mode .col-pilota-image {
    border-color: #2a2d33 !important;
}
body.dark-mode .col-pilota-info {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

/* Club page */
body.dark-mode h5.club-page {
    border-bottom: 1px solid #2a2d33 !important;
    color: #f6f6f6 !important;
}
body.dark-mode h5.club-page:hover {
    opacity: 0.85;
}

/* Calendario day grid */
body.dark-mode .fc .fc-daygrid-day-frame {
    background-color: #1a1c1f !important;
}

/* Tooltip */
body.dark-mode .tooltip-secondary {
    --bs-tooltip-bg: rgba(26, 28, 31, 0.98) !important;
}

/* No results */
body.dark-mode .no-results::before {
    color: #e95027 !important;
}

/* Pagination */
body.dark-mode .paginazione .page-link.active {
    background-color: #e95027 !important;
    border-color: #e95027 !important;
}

/* Cerca-filtra */
body.dark-mode .cerca-filtra {
    background-color: #181b20 !important;
    border: 1px solid #2a2d33 !important;
    color: #f6f6f6 !important;
}

/* Telegram box */
body.dark-mode .telegram-bg {
    filter: brightness(0.6) !important;
}
body.dark-mode .telegram-msg {
    background-color: #1a1c1f !important;
    border-color: #2a2d33 !important;
    color: #f6f6f6 !important;
}

/* Offcanvas top/bottom */
body.dark-mode .offcanvas-top,
body.dark-mode .offcanvas-bottom {
    background-color: #181b20 !important;
}

/* Action sheet */
body.dark-mode .offcanvas.action-sheet .action-sheet-content {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
}

/* Misc icons */
body.dark-mode i {
    color: #808185 !important;
}
/* =========================================================
   =====================  FIX FINALI  =======================
   ========================================================= */

/* Navbar (desktop) */
body.dark-mode .navbar,
body.dark-mode .navbar-dark {
    background-color: #181b20 !important;
    border-bottom: 1px solid #2a2d33 !important;
}

body.dark-mode .navbar-dark .navbar-nav .nav-link {
    color: #f6f6f6 !important;
}

body.dark-mode .navbar-dark .navbar-nav .nav-link:hover {
    background-color: #2a2d33 !important;
    color: #e95027 !important;
}

/* Sticky top border */
body.dark-mode .sticky-top {
    border-bottom: 4px solid #2a2d33 !important;
}

/* Buttons accent */
body.dark-mode .btn.btn-accent,
body.dark-mode .btn.btn-accent-outline {
    background-color: #e95027 !important;
    border-color: #e95027 !important;
    color: #fff !important;
}

body.dark-mode .btn.btn-accent:hover,
body.dark-mode .btn.btn-accent-outline:hover {
    opacity: 0.85;
}

/* Default links */
body.dark-mode .def-link {
    color: #808185 !important;
}
body.dark-mode .def-link:hover {
    color: #e95027 !important;
}

/* Pagination */
body.dark-mode .page-link {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
    border-color: #2a2d33 !important;
}
body.dark-mode .page-link:hover {
    background-color: #2a2d33 !important;
}
body.dark-mode .page-item.disabled .page-link {
    color: #808185 !important;
}

/* Search auto-disabled */
body.dark-mode button.auto-disabled[aria-disabled="true"] {
    background-color: #2a2d33 !important;
    border-color: #2a2d33 !important;
    color: #808185 !important;
}

/* Tooltip */
body.dark-mode .tooltip-secondary {
    --bs-tooltip-bg: rgba(26, 28, 31, 0.98) !important;
}

/* Skeleton shimmer */
body.dark-mode @keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Club page image borders */
body.dark-mode .club-col-image img {
    border: 1px solid #2a2d33 !important;
}

/* Category badges */
body.dark-mode .badge-nsr,
body.dark-mode .badge-slotit,
body.dark-mode .badge-thunder,
body.dark-mode .badge-sideways,
body.dark-mode .badge-policar,
body.dark-mode .badge-scaleauto,
body.dark-mode .badge-brm,
body.dark-mode .badge-revoslot,
body.dark-mode .badge-ninco,
body.dark-mode .badge-open {
    filter: brightness(0.85);
}

/* Calendar day hover */
body.dark-mode .fc-daygrid-day:hover {
    background-color: #2a2d33 !important;
}

/* Calendar event */
body.dark-mode .fc-daygrid-event {
    background-color: #2a2d33 !important;
    color: #f6f6f6 !important;
    border-color: #2a2d33 !important;
}

/* Ranking accordion */
body.dark-mode .acAccordion .accordion-button {
    background-color: #181b20 !important;
    color: #f6f6f6 !important;
    border-color: #2a2d33 !important;
}

body.dark-mode .acAccordion .accordion-button:not(.collapsed) {
    background-color: #e95027 !important;
    color: #fff !important;
}

/* Club note overlay */
body.dark-mode .club-note-overlay {
    background-color: rgba(11, 10, 15, 0.95) !important;
}

/* Club note box */
body.dark-mode .club-note-box {
    background-color: #181b20 !important;
    border-color: #2a2d33 !important;
    color: #f6f6f6 !important;
}

/* Calendar list view */
body.dark-mode .fc-list-event {
    background-color: #181b20 !important;
    border-color: #2a2d33 !important;
}

/* Calendar today highlight (optional) */
body.dark-mode .fc .fc-daygrid-day.fc-day-today {
    background-color: #2a2d33 !important;
}

/* Home tabs */
body.dark-mode #homeTabs .nav-link {
    color: #f6f6f6 !important;
}
body.dark-mode #homeTabs .nav-link.active {
    background-color: #2a2d33 !important;
    color: #e95027 !important;
}

/* Splide pagination */
body.dark-mode .splide__pagination__page.is-active {
    background-color: #e95027 !important;
}

/* Offcanvas borders */
body.dark-mode .offcanvas-header {
    border-bottom: 1px solid #2a2d33 !important;
}

/* WP comments */
body.dark-mode #comments .form-submit {
    color: #f6f6f6 !important;
}

/* WP cancel reply */
body.dark-mode #cancel-comment-reply {
    color: #e95027 !important;
}

/* WP tag cloud */
body.dark-mode .wp-block-tag-cloud.is-style-outline a {
    background-color: #2a2d33 !important;
    color: #f6f6f6 !important;
}

/* Telegram background */
body.dark-mode .telegram-bg {
    filter: brightness(0.6) !important;
}

/* Misc icons */
body.dark-mode i {
    color: #808185 !important;
}

/* Final global polish */
body.dark-mode * {
    scrollbar-color: #2a2d33 #0b0a0f;
}
