/* Left sidebar offcanvas — white panel (matches default filter offcanvas-end) */

#sidebarPanel.offcanvas-start {
  background: #ffffff !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-right: 1px solid #e1e1e1 !important;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.08) !important;
  color: #141515;
}

#sidebarPanel .offcanvas-body {
  background: #ffffff !important;
}

#sidebarPanel.offcanvas-start::after {
  display: none;
}

/* Right filter offcanvas — white panel (matches left sidebar) */
#offcanvas-right.offcanvas-end {
  background: #ffffff !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-left: 1px solid #e1e1e1 !important;
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.08) !important;
  color: #141515;
}

#offcanvas-right .offcanvas-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e1e1e1;
}

#offcanvas-right .offcanvas-body {
  background: #ffffff !important;
}

#offcanvas-right .offcanvas-title {
  color: #141515 !important;
  font-weight: 700;
}

#sidebarPanel .profileBox {
  background: #ffffff !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid #e1e1e1;
  box-shadow: none;
}

#sidebarPanel .profileBox::before {
  background: #ffffff !important;
}

#sidebarPanel .profileBox .in strong {
  color: #141515;
}

#sidebarPanel .profileBox .in .text-muted,
#sidebarPanel .profileBox .in .sidebar-profile-type {
  color: #6c757d !important;
}

#sidebarPanel .profileBox .in .sidebar-profile-type i {
  color: #fe9500;
}

#sidebarPanel .close-sidebar-button {
  color: #6c757d !important;
}

#sidebarPanel .close-sidebar-button:hover,
#sidebarPanel .close-sidebar-button:focus-visible {
  color: #141515 !important;
  background: rgba(0, 0, 0, 0.06);
}

#sidebarPanel .offcanvas-body > .listview {
  padding: 12px 16px 0;
  background: #ffffff !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
}

#sidebarPanel .listview > li {
  background: transparent !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
}

#sidebarPanel .image-listview > li .item {
  margin-bottom: 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #e1e1e1 !important;
  background: #ffffff !important;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#sidebarPanel .image-listview > li a.item {
  color: #141515 !important;
  padding-right: 15px;
}

#sidebarPanel .image-listview > li a.item:active {
  background: rgba(0, 0, 0, 0.04);
}

#sidebarPanel .image-listview > li a.item::after {
  opacity: 1;
  filter: none;
}

#sidebarPanel .image-listview > li .item .in {
  border: 0 !important;
  background: transparent !important;
  color: #141515;
}

#sidebarPanel .image-listview > li .item .in > div {
  color: #141515;
}

#sidebarPanel .divider {
  background: #e1e1e1;
  margin-left: 0.85rem;
  margin-right: 0.85rem;
}

#sidebarPanel .sidebar-social {
  padding: 0.85rem 16px calc(1rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e1e1e1;
  margin-top: 0.35rem;
  background: #ffffff !important;
}

#sidebarPanel .sidebar-social__label {
  margin: 0 0 0.65rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6c757d;
}

#sidebarPanel .sidebar-social__links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0 0.85rem;
}

#sidebarPanel .sidebar-social__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  min-width: 0;
  border-radius: 999px;
  border: none;
  color: #ffffff !important;
  font-size: clamp(0.85rem, 3.2vw, 1.05rem);
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#sidebarPanel .sidebar-social__btn:hover,
#sidebarPanel .sidebar-social__btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

#sidebarPanel .sidebar-social__btn--facebook {
  background: #1877f2;
}

#sidebarPanel .sidebar-social__btn--instagram {
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
}

#sidebarPanel .sidebar-social__btn--tiktok {
  background: #010101;
}

#sidebarPanel .sidebar-social__btn--x {
  background: #000000;
}

#sidebarPanel .sidebar-social__btn--youtube {
  background: #ff0000;
}

/* --------------------------------------------------------------------------
   Desktop: persistent left sidebar; mobile keeps offcanvas toggle
   -------------------------------------------------------------------------- */

:root {
  --dwc-sidebar-width: 300px;
}

@media (min-width: 992px) {
  html.app-page-scroll:has(body.dwc-sidebar-desktop),
  body.dwc-sidebar-desktop {
    height: 100%;
    overflow: hidden;
  }

  body.dwc-sidebar-desktop #sidebarPanel.offcanvas-start,
  body.dwc-sidebar-desktop #sidebarPanel.offcanvas-start.dwc-sidebar-persistent {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    width: var(--dwc-sidebar-width);
    max-width: var(--dwc-sidebar-width);
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto;
  }

  body.dwc-sidebar-desktop #sidebarPanel.offcanvas-start .offcanvas-body {
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    margin-top: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  body.dwc-sidebar-desktop #sidebarPanel .profileBox {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin-top: 0;
  }

  body.dwc-sidebar-desktop #sidebarPanel .profileBox::before {
    display: none;
  }

  body.dwc-sidebar-desktop #sidebarPanel .close-sidebar-button {
    display: none !important;
  }

  body.dwc-sidebar-desktop .appHeader {
    left: var(--dwc-sidebar-width) !important;
    right: 0 !important;
    width: calc(100% - var(--dwc-sidebar-width)) !important;
  }

  body.dwc-sidebar-desktop #appCapsule {
    position: fixed;
    top: calc(56px + env(safe-area-inset-top, 0px));
    left: var(--dwc-sidebar-width);
    right: 0;
    bottom: 0;
    width: auto;
    margin-left: 0;
    margin-top: 0;
    padding-top: 0.35rem !important;
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: max(1rem, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(1rem, env(safe-area-inset-right, 0px)) !important;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 2;
  }

  body.dwc-sidebar-desktop:has(#filter_header:not(.d-none)):not(:has(.live-schedule-page)) #appCapsule {
    top: calc(56px + env(safe-area-inset-top, 0px) + 4rem) !important;
    padding-top: 0.35rem !important;
  }

  body.dwc-sidebar-desktop #appCapsule:has(.ad_div) {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px) + 1rem) !important;
  }

  body.dwc-sidebar-desktop #appCapsule:has(.dwc-auth-page),
  body.dwc-sidebar-desktop #appCapsule:has(.manage-dancers-layout),
  body.dwc-sidebar-desktop #appCapsule:has(.manage-profile-layout) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
  }

  body.dwc-sidebar-desktop .appHeader [data-bs-target="#sidebarPanel"] {
    display: none !important;
  }

  body.dwc-sidebar-desktop .offcanvas-backdrop {
    display: none !important;
  }

  body.dwc-sidebar-desktop #filter_header.listview-title.sticky-title {
    left: calc(var(--dwc-sidebar-width) + ((100vw - var(--dwc-sidebar-width)) / 2));
    max-width: calc(100vw - var(--dwc-sidebar-width) - 1rem);
  }
}

@media (max-width: 991.98px) {
  body.dwc-sidebar-desktop #sidebarPanel.offcanvas-start:not(.show) {
    visibility: hidden;
  }
}

/* Let page content scroll above the static background */
body.app-page-bg #appCapsule {
  background: transparent !important;
  background-color: transparent !important;
}

/* Live schedule — no extra filter-header offset; pill floats over scrolling content */
body.app-page-bg #appCapsule.appCapsule--live-schedule {
  padding-top: calc(56px + env(safe-area-inset-top, 0px)) !important;
}

@media (min-width: 992px) {
  body.dwc-sidebar-desktop #appCapsule.appCapsule--live-schedule {
    top: calc(56px + env(safe-area-inset-top, 0px)) !important;
    padding-top: 0.35rem !important;
  }
}
