/**
 * [B] SPA Sidebar Nav — Elementor Widget Frontend Styles
 *
 * @package BDW_Spa_Sidebar
 */

/* ── SIDEBAR ─────────────────────────────────── */
.bdw-sidebar {
  position: fixed;
  top: 0;
  height: 100vh;
  width: 220px;
  background: #111110;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bdw-sidebar--left {
  left: 0;
}

.bdw-sidebar--right {
  right: 0;
}

.bdw-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Scrollbar */
.bdw-sidebar-inner::-webkit-scrollbar {
  width: 3px;
}

.bdw-sidebar-inner::-webkit-scrollbar-track {
  background: transparent;
}

.bdw-sidebar-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* ── BODY PUSH ───────────────────────────────── */
body.bdw-sidebar-push--left {
  margin-left: 220px;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.bdw-sidebar-push--right {
  margin-right: 220px;
  transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── LOGO ────────────────────────────────────── */
.bdw-sidebar-logo {
  padding: 40px 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.bdw-sidebar-logo a {
  display: block;
  text-decoration: none;
  width: 100%;
}

.bdw-sidebar-logo img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
  object-fit: contain;
  object-position: left center;
}

/* ── NAV ─────────────────────────────────────── */
.bdw-sidebar-nav {
  flex: 1;
}

.bdw-sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bdw-sidebar-nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bdw-sidebar-nav a {
  display: block;
  padding: 14px 30px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  text-decoration: none;
  position: relative;
  transition:
    color 0.3s ease,
    padding-left 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    font-weight 0.3s ease,
    opacity 0.3s ease;
}

/* Active accent bar (left edge) */
.bdw-sidebar-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #E8601A;
  transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease;
}

.bdw-sidebar-nav a:hover,
.bdw-sidebar-nav li.bdw-active>a {
  color: #fff;
  padding-left: 36px;
}

/* Focus visible (WCAG 2.2 AA) */
.bdw-sidebar-nav a:focus-visible {
  outline: 2px solid #E8601A;
  outline-offset: -2px;
  color: #fff;
  padding-left: 36px;
}

.bdw-sidebar-logo a:focus-visible {
  outline: 2px solid #E8601A;
  outline-offset: 2px;
}

.bdw-sidebar-footer a:focus-visible {
  outline: 2px solid #E8601A;
  outline-offset: 2px;
}

.bdw-sidebar-nav a:hover::before,
.bdw-sidebar-nav li.bdw-active>a::before {
  height: 28px;
}

/* Initials — hidden by default on desktop */
.bdw-sidebar-nav-initial {
  display: none;
}

/* ── FOOTER ──────────────────────────────────── */
.bdw-sidebar-footer {
  padding: 30px;
  margin-top: auto;
  flex-shrink: 0;
}

.bdw-sidebar-footer-text {
  font-size: 10px;
  line-height: 1.6;
  margin-bottom: 8px;
  max-width: 100%;
}

.bdw-sidebar-footer-email {
  font-size: 10px;
  color: #888;
  text-decoration: none;
  transition: color 0.3s ease;
}

.bdw-sidebar-footer-email:hover {
  color: #E8601A;
}

/* ── SCROLL PROGRESS ─────────────────────────── */
.bdw-sidebar-progress {
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  z-index: 2;
}

.bdw-sidebar--right .bdw-sidebar-progress {
  right: auto;
  left: 0;
}

.bdw-sidebar-progress-bar {
  width: 3px;
  height: 0;
  background: #E8601A;
  transition: height 0.1s linear;
}

/* ── RESPONSIVE: Tablet (collapsed) ──────────── */
@media (max-width: 1024px) {
  .bdw-sidebar {
    width: 72px;
  }

  body.bdw-sidebar-push--left {
    margin-left: 72px;
  }

  body.bdw-sidebar-push--right {
    margin-right: 72px;
  }

  .bdw-sidebar-logo {
    padding: 20px 12px;
    justify-content: center;
  }

  .bdw-sidebar-logo img {
    max-width: 100%;
  }

  /* Collapse: initials mode */
  .bdw-sidebar--collapse-initials .bdw-sidebar-nav-label {
    display: none;
  }

  .bdw-sidebar--collapse-initials .bdw-sidebar-nav-initial {
    display: block;
  }

  .bdw-sidebar--collapse-initials .bdw-sidebar-nav a {
    text-align: center;
    padding: 14px 0;
    font-size: 14px;
    letter-spacing: 0;
  }

  .bdw-sidebar--collapse-initials .bdw-sidebar-nav a:hover,
  .bdw-sidebar--collapse-initials .bdw-sidebar-nav li.bdw-active>a {
    padding-left: 0;
  }

  /* Collapse: hidden mode */
  .bdw-sidebar--collapse-hidden {
    display: none;
  }

  .bdw-sidebar--collapse-hidden~body {
    margin-left: 0;
    margin-right: 0;
  }

  /* Footer hidden in collapsed */
  .bdw-sidebar-footer {
    display: none;
  }
}

/* ── RESPONSIVE: Mobile ──────────────────────── */
@media (max-width: 768px) {
  .bdw-sidebar {
    width: 56px;
  }

  body.bdw-sidebar-push--left {
    margin-left: 56px;
  }

  body.bdw-sidebar-push--right {
    margin-right: 56px;
  }

  .bdw-sidebar-logo {
    padding: 16px 8px;
    justify-content: center;
  }

  .bdw-sidebar-logo img {
    max-width: 100%;
  }

  .bdw-sidebar--collapse-initials .bdw-sidebar-nav a {
    font-size: 12px;
    padding: 12px 0;
  }
}

/* ── RESPONSIVE: Small Mobile ────────────────── */
@media (max-width: 480px) {
  .bdw-sidebar {
    width: 48px;
  }

  body.bdw-sidebar-push--left {
    margin-left: 48px;
  }

  body.bdw-sidebar-push--right {
    margin-right: 48px;
  }

  .bdw-sidebar-logo {
    padding: 12px 6px;
    justify-content: center;
  }

  .bdw-sidebar-logo img {
    max-width: 100%;
  }

  .bdw-sidebar--collapse-initials .bdw-sidebar-nav a {
    font-size: 11px;
    padding: 10px 0;
  }
}

/* ── ELEMENTOR EDITOR ────────────────────────── */
.elementor-editor-active .bdw-sidebar {
  position: relative;
  height: auto;
  min-height: 400px;
}