/*
 * =============================================================
 *  ParksEasy — MOBILE.CSS
 *  THE ONLY FILE FOR MOBILE/TABLET RESPONSIVE STYLES
 * =============================================================
 *
 *  ARCHITECTURAL RULES (enforced — do not bypass):
 *
 *  1. EVERY rule in this file MUST be inside a @media query.
 *     No bare selectors allowed at the top level.
 *
 *  2. NEVER modify these global desktop classes here:
 *       .navbar | .listings-grid | .testimonials-grid
 *       .hero-container | .footer-grid
 *     Only ADD mobile variants inside media queries.
 *
 *  3. Mobile-only elements (.mobile-menu, .mobile-nav-drawer)
 *     must be set to display:none at base (desktop) level
 *     and revealed only inside @media (max-width: 991px).
 *
 *  Breakpoints:
 *    Tablet + Mobile : @media (max-width: 991px)
 *    Mobile only     : @media (max-width: 600px)
 *
 * =============================================================
 */

/* ─────────────────────────────────────────────────────────────
   MOBILE BASE RESETS — Hidden on desktop
───────────────────────────────────────────────────────────── */
#mobile-menu {
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   TABLET + MOBILE  (max-width: 991px)
───────────────────────────────────────────────────────────── */
@media (max-width: 991px) {

  /* ── Mobile Menu Drawer ────────────────────────────────── */
  #mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: auto !important;
    right: -100% !important;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.22);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100000 !important;
    padding: 1.5rem 1.2rem;
    overflow-y: auto;
    gap: 0.3rem;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none;
  }

  /* When .open is toggled by auth-guard.js → drawer slides in from right */
  #mobile-menu.open {
    right: 0 !important;
    pointer-events: auto !important;
  }

  /* Dim overlay behind the open drawer */
  body.mobile-menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99999;
    animation: fadeInOverlay 0.25s ease forwards;
    pointer-events: auto;
  }

  @keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  /* ── Drawer Nav Links ─────────────────────────────────── */
  #mobile-menu a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1E40AF;
    text-decoration: none;
    border-radius: 10px;
    border-bottom: 1px solid #f0f4ff;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
  }

  #mobile-menu a:hover,
  #mobile-menu a:active {
    background: #EFF6FF;
    color: #1d4ed8;
    padding-left: 1.4rem;
  }

  /* ── Mobile Actions (login/signup buttons inside drawer) */
  #mobile-menu .mobile-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  #mobile-menu .mobile-actions a,
  #mobile-menu .mobile-actions button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: center;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.075rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    border: none;
  }

  #mobile-menu .mobile-actions .btn-login {
    background: transparent;
    color: #1E40AF;
    border: 2px solid #1E40AF;
  }

  #mobile-menu .mobile-actions .btn-signup {
    background: #1E40AF;
    color: #ffffff;
  }

  #mobile-menu .mobile-actions .btn-login:hover,
  #mobile-menu .mobile-actions .btn-signup:hover {
    opacity: 0.85;
  }

  /* ── Grid Layouts — single column on mobile ─────────── */
  .listings-grid {
    grid-template-columns: 1fr !important;
    gap: 1.2rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr !important;
    gap: 1.2rem;
  }

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

  footer.bg-gray-900,
  footer.footer,
  .footer-bottom {
    padding-bottom: 85px !important;
  }

  /* === Hero Section === */
  .hero-container {
    flex-direction: column !important;
    text-align: center;
    padding: 2rem 1rem;
  }

  /* ── General spacing ─────────────────────────────────── */
  .section-container,
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* ── Email Composer Modal Mobile Adjustments ─────────── */
  .email-modal-dialog {
    max-width: 95% !important;
    margin: 10px !important;
  }
  .email-modal-header,
  .email-modal-body,
  .email-modal-footer {
    padding: 14px 16px !important;
  }
  .composer-field-row {
    gap: 8px !important;
  }
  .composer-label {
    width: 48px !important;
    font-size: 16.5px !important;
  }

  /* ── Floating WhatsApp Button (Tablet) ────────────────── */
  .scroll-to-top-btn {
    bottom: 24px !important;
    right: 20px !important;
    width: 44px !important;
    height: 44px !important;
  }
  .floating-whatsapp-btn {
    bottom: 19px !important;
    right: 76px !important;
    width: 54px !important;
    height: 54px !important;
    padding: 0 !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .floating-whatsapp-btn .wa-icon {
    width: 32px !important;
    height: 32px !important;
  }
  .floating-whatsapp-btn .wa-label {
    display: none !important;
  }

}

/* ─────────────────────────────────────────────────────────────
   MOBILE ONLY  (max-width: 600px)
───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {

  /* ── Floating WhatsApp Button (Mobile Phone) ───────────── */
  .scroll-to-top-btn {
    bottom: 20px !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
  }
  .floating-whatsapp-btn {
    bottom: 16px !important;
    right: 68px !important;
    width: 50px !important;
    height: 50px !important;
    padding: 0 !important;
    border-radius: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .floating-whatsapp-btn .wa-icon {
    width: 30px !important;
    height: 30px !important;
  }
  .floating-whatsapp-btn .wa-label {
    display: none !important;
  }

}


