/* ============ responsive.css — موبایل و تبلت ============ */

/* ---------- دکمه همبرگری (FAB) — فقط موبایل ---------- */
body:has(.player.is-open) .menu-fab {
  bottom: 13%;
}

.menu-fab[aria-expanded="true"] {
  left: 8%;
}

.menu-fab {
  transition: 0.5s all;
  display: none;
  position: fixed;
  bottom: 2%;
  left: 20px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 8px 26px rgba(185, 28, 28, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.menu-fab:hover {
  box-shadow: var(--neon-glow), 0 8px 26px rgba(185, 28, 28, 0.55);
}

.menu-fab:active {
  transform: scale(0.92);
}

/* overlay پشت سایدبار موبایل */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* دکمه toggle فیلتر — فقط موبایل */
.filter-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  color: var(--muted-foreground, #d6d3d1);
  font-size: 17px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.filter-toggle:hover,
.filter-toggle[aria-expanded="true"] {
  color: var(--neon-red, #ff2d2d);
  border-color: rgba(255, 70, 70, 0.5);
  background: rgba(185, 28, 28, 0.15);
}

/* آکاردئون فیلتر — پیش‌فرض دسکتاپ: همیشه باز */
.navbar__filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ========== تبلت (<=1024px) ========== */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 80px;
  }

  .brand__text,
  .nav__item span:not([data-icon]),
  .sidebar__foot {
    display: none;
  }

  .brand {
    justify-content: center;
    padding: 8px 0 16px;
  }

  .nav__item {
    justify-content: center;
    padding: 12px;
  }
}

/* ========== موبایل (<=680px) ========== */
@media (max-width: 680px) {
  :root {
    --sidebar-w: 0px;
  }

  /* --- سایدبار → پنل شناور از پایین-راست --- */
  body:has(.player.is-open) .sidebar {
    bottom: 22%;
  }



  .sidebar {
    position: fixed;
    top: auto;
    bottom: 11%;
    left: 12px;
    right: auto;
    width: 25%;
    height: auto;
    max-height: 70vh;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    border-left: 1px solid var(--glass-border);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    padding: 18px 14px;
    gap: 10px;
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    overflow-y: auto;
  }

  .sidebar.is-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;

  }

  .brand {
    display: none;
  }

  .sidebar__foot {
    display: none;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .nav__item {
    justify-content: center;
    padding: 12px;
    border-radius: 14px;
    width: 52px;
    height: 52px;
  }

  .nav__item span:not([data-icon]) {
    display: none;
  }

  .nav__item i {
    font-size: 20px;
  }

  .menu-fab {
    display: grid;
    place-items: center;
  }

  .sidebar-overlay {
    display: block;
  }

  /* --- محتوا --- */
  .main {
    margin-right: 0;
    padding: 0 14px 24px;
  }

  /* --- نوار‌بار: فیلترها آکاردئونی --- */
  .filter-toggle {
    display: grid;
    place-items: center;
  }

  .navbar__filters {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
    margin-top: 0;
  }

  .navbar__filters.is-open {
    max-height: 300px;
    opacity: 1;
    margin-top: 14px;
  }

  .navbar {
    padding: 12px 14px;
    gap: 0;
  }

  .search {
    min-width: 0;
  }

  /* --- گرید: ۲ ستونه سرود + ویدئو, ۳ ستونه هنرمند --- */
  .grid {
    grid-template-columns: 49% 49% !important;
    gap: 2%;
    row-gap: 9px;
  }

  .grid--artists {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .grid--genres {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* بنر */
  .hero-slider {
    margin: 0 -14px 10px;
  }

  /* پلیر موبایل: کمی بالاتر از FAB */
  .player {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  /* فوتر */
  .footer {
    margin-right: 0;
  }
}

/* موبایل کوچک */
@media (max-width: 400px) {
  .grid--artists {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .acard {
    padding: 16px 8px 14px;
  }

  .acard__avatar {
    width: 60px;
    height: 60px;
  }

  .acard__name {
    font-size: 0.78rem;
  }
}