/* =======================================================
   Mantra Japa Counter - Responsive Adaptations
   Mobile-First Breakpoints & Device Optimizations
   ======================================================= */

/* Small Smartphones (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .japa-tool-card {
    padding: 1.5rem 0.85rem;
    border-radius: var(--radius-lg);
  }

  .counter-value {
    font-size: 3.5rem;
  }

  .btn-tap-count {
    min-height: 80px;
    font-size: 1.25rem;
    border-radius: var(--radius-lg);
  }

  .btn-inc {
    min-width: 44px;
    height: 40px;
    padding: 0 0.65rem;
    font-size: 0.82rem;
  }

  .goal-progress-wrap {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .stat-card {
    padding: 0.85rem 0.65rem;
  }

  .stat-card-value {
    font-size: 1.25rem;
  }

  .stat-card-label {
    font-size: 0.72rem;
  }

  .steps-list {
    grid-template-columns: 1fr;
  }

  .bead {
    width: 12px;
    height: 12px;
  }

  .ambient-sound-bar {
    border-radius: var(--radius-lg);
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
  }

  .ambient-track-select {
    font-size: 0.78rem;
    width: 100%;
  }
}

/* Tablets and Mobile Navigation (max-width: 992px) */
@media (max-width: 992px) {
  .nav-menu {
    display: none !important;
  }

  .menu-toggle {
    display: flex !important;
  }

  .btn-pwa-install {
    display: none !important;
  }

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

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

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand-wrap {
    grid-column: span 2;
  }
}

/* Smartphone Header Optimization (max-width: 580px) */
@media (max-width: 580px) {
  .navbar {
    height: 4rem;
    gap: 0.5rem;
  }

  .nav-brand {
    gap: 0.5rem;
  }

  .brand-icon {
    width: 35px;
    height: 35px;
  }

  .brand-icon svg {
    width: 22px;
    height: 22px;
  }

  .brand-title {
    font-size: 1.12rem;
  }

  .nav-actions {
    gap: 0.3rem;
  }

  /* Hide extra audio/haptic toggles from header top bar on phones (they are prominent in the drawer) */
  .header-extra-toggle {
    display: none !important;
  }

  .btn-icon,
  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  .menu-toggle span {
    width: 18px;
  }

  .drawer-links-grid {
    grid-template-columns: 1fr;
  }
}

/* Very Small Smartphones (max-width: 360px) */
@media (max-width: 360px) {
  .brand-title {
    font-size: 1rem;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
  }

  .brand-icon svg {
    width: 18px;
    height: 18px;
  }

  .btn-icon,
  .menu-toggle {
    width: 34px;
    height: 34px;
    padding: 6px;
  }
}

/* Mobile Screens below 640px */
@media (max-width: 640px) {
  .mantra-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-brand-wrap {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .shortcuts-legend {
    display: none; /* Hide desktop shortcuts tip on touch screens */
  }
}

/* Desktop and Large Screens (min-width: 901px) */
@media (min-width: 901px) {
  .menu-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
  }
}
