/* ═══════════════════════════════════════════════════════════════
   Bottom Sheet Mobile Navigation
   ═══════════════════════════════════════════════════════════════ */

/* Only active on mobile (max-width: 1100px) */
@media (max-width: 1100px) {
  /* ─────────────────────────────────────────────────────────────
     Backdrop Overlay
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    pointer-events: none;
  }

  .bottom-sheet-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* ─────────────────────────────────────────────────────────────
     Bottom Sheet Container
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: var(--bg-primary);
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--border-subtle);
    border-bottom: none;
    z-index: 999;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.3);
  }

  .bottom-sheet.active {
    transform: translateY(0);
  }

  /* ─────────────────────────────────────────────────────────────
     Drag Handle
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__handle {
    width: 40px;
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
    margin: 12px auto;
    flex-shrink: 0;
  }

  /* ─────────────────────────────────────────────────────────────
     Sections
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__section {
    padding: 0 1.5rem;
    flex-shrink: 0;
  }

  .bottom-sheet__section:not(:first-of-type) {
    border-top: 1px solid var(--border-subtle);
    margin-top: 1rem;
  }

  .bottom-sheet__section:last-of-type {
    padding-bottom: 1.5rem;
  }

  /* ─────────────────────────────────────────────────────────────
     Section Title
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    margin: 1rem 0 0.75rem 0;
    padding: 0;
  }

  /* ─────────────────────────────────────────────────────────────
     Categories Grid (2-3 columns)
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 0.5rem;
  }

  /* Larger screens use 3 columns */
  @media (min-width: 500px) {
    .bottom-sheet__grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  /* ─────────────────────────────────────────────────────────────
     Category Items
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 80px;
    touch-action: manipulation;
    outline: 2px solid transparent;
    outline-offset: 2px;
  }

  .bottom-sheet__item:active {
    background: rgba(201, 169, 110, 0.1);
    transform: scale(0.95);
  }

  .bottom-sheet__item:focus-visible {
    outline-color: var(--gold);
  }

  @media (hover: hover) {
    .bottom-sheet__item:hover {
      background: rgba(201, 169, 110, 0.15);
    }
  }

  /* ─────────────────────────────────────────────────────────────
     Category Icon
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .bottom-sheet__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* ─────────────────────────────────────────────────────────────
     Category Label
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__label {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.2;
  }

  /* ─────────────────────────────────────────────────────────────
     Quick Links Section
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__section--links {
    flex-shrink: 0;
  }

  .bottom-sheet__links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  /* ─────────────────────────────────────────────────────────────
     Quick Links
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 48px;
    touch-action: manipulation;
    outline: 2px solid transparent;
    outline-offset: 2px;
  }

  .bottom-sheet__link:active {
    background: rgba(201, 169, 110, 0.1);
    transform: scale(0.98);
  }

  .bottom-sheet__link:focus-visible {
    outline-color: var(--gold);
  }

  @media (hover: hover) {
    .bottom-sheet__link:hover {
      background: rgba(201, 169, 110, 0.15);
      gap: 1rem;
    }
  }

  .bottom-sheet__link i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* Featured link (Play Safe) */
  .bottom-sheet__link--featured {
    background: rgba(201, 169, 110, 0.15);
    color: var(--gold);
    border: 1px solid var(--border-subtle);
  }

  @media (hover: hover) {
    .bottom-sheet__link--featured:hover {
      background: rgba(201, 169, 110, 0.25);
      border-color: var(--gold);
    }
  }

  /* ─────────────────────────────────────────────────────────────
     Close Button
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
    outline: 2px solid transparent;
    outline-offset: 2px;
  }

  .bottom-sheet__close:active {
    background: rgba(201, 169, 110, 0.15);
    transform: scale(0.95);
  }

  .bottom-sheet__close:focus-visible {
    outline-color: var(--gold);
  }

  @media (hover: hover) {
    .bottom-sheet__close:hover {
      background: rgba(201, 169, 110, 0.15);
      color: var(--gold);
    }
  }

  .bottom-sheet__close i {
    width: 24px;
    height: 24px;
  }

  /* ─────────────────────────────────────────────────────────────
     Scrollable Content Padding
     ───────────────────────────────────────────────────────────── */
  .bottom-sheet {
    scroll-padding-top: 60px;
  }

  .bottom-sheet::-webkit-scrollbar {
    width: 6px;
  }

  .bottom-sheet::-webkit-scrollbar-track {
    background: transparent;
  }

  .bottom-sheet::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
  }

  .bottom-sheet::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  /* ─────────────────────────────────────────────────────────────
     Body Overflow Control
     ───────────────────────────────────────────────────────────── */
  body.bottom-sheet-open {
    overflow: hidden;
  }

  /* ─────────────────────────────────────────────────────────────
     Accessibility: Reduced Motion
     ───────────────────────────────────────────────────────────── */
  @media (prefers-reduced-motion: reduce) {
    .bottom-sheet,
    .bottom-sheet-backdrop {
      transition: none;
    }

    .bottom-sheet__item,
    .bottom-sheet__link,
    .bottom-sheet__close {
      transition: none;
    }
  }
}

/* ═══════════════════════════════════════════════════════════════
   Desktop: Hide Bottom Sheet (max-width: 1100px already hides on mobile)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1101px) {
  .bottom-sheet-backdrop,
  .bottom-sheet {
    display: none;
  }
}
