/* ==========================================================================
   Mobile App Experience — bottom nav, drawer, touch UI
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .site-footer {
    padding-bottom: 0;
  }

  #main-content {
    min-height: calc(100vh - var(--header-height, 72px) - 4.75rem);
  }

  /* Compact app-like header */
  .site-header {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  }

  .site-header.scrolled {
    box-shadow: 0 4px 24px rgba(15, 76, 129, 0.08);
  }

  .navbar {
    min-height: 60px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .nav-toggle:active {
    transform: scale(0.94);
  }

  /* Slide drawer */
  .mobile-nav-overlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-nav {
    width: min(340px, 88vw);
    border-radius: 24px 0 0 24px;
    padding: 1.25rem 1rem 2rem;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
    transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .mobile-nav.open {
    transform: translateX(0);
  }

  .mobile-nav__close {
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    transition: transform 0.2s ease, background 0.2s ease;
  }

  .mobile-nav__close:active {
    transform: scale(0.92);
  }

  .mobile-nav__link-icon {
    width: 1.75rem;
    display: inline-flex;
    justify-content: center;
    margin-right: 0.65rem;
    font-size: 1.1rem;
  }

  .mobile-nav__list > li > a,
  .mobile-nav__toggle {
    min-height: 48px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    padding-inline: 0.85rem;
    margin-bottom: 0.25rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  }

  .mobile-nav__list > li > a:active,
  .mobile-nav__toggle:active,
  .mobile-nav__sub-link:active {
    transform: scale(0.98);
  }

  .mobile-nav__list > li > a:hover,
  .mobile-nav__toggle:hover {
    background: color-mix(in srgb, var(--primary) 7%, transparent);
  }

  .mobile-nav__panel {
    animation: mobilePanelIn 0.28s ease;
  }

  @keyframes mobilePanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .mobile-nav__actions .btn {
    min-height: 48px;
    border-radius: 14px;
    font-weight: 600;
  }

  .mobile-nav__contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .mobile-nav__contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.65rem 0.75rem;
    border-radius: 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav__contact-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .mobile-nav__contact-btn:active {
    transform: scale(0.97);
  }

  .mobile-nav__contact-btn--call {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  }

  .mobile-nav__contact-btn--whatsapp {
    color: #fff;
    background: linear-gradient(135deg, #25d366, #128c7e);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  }

  /* Repair page: compact header, no horizontal scroll */
  .repair-request-page .site-header .navbar {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .repair-request-page .logo span,
  .repair-request-page .site-logo__text {
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .repair-request-page .nav-actions {
    flex-shrink: 0;
    gap: 0.35rem;
  }

  /* Sticky bottom navigation — grid/theme in premium-ui.css */
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9990;
    display: grid;
  }

  .mobile-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 52px;
    padding: 0.35rem 0.25rem;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
  }

  .mobile-bottom-nav__item:active {
    transform: scale(0.94);
  }

  .mobile-bottom-nav__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-bottom-nav__icon svg {
    width: 22px;
    height: 22px;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-bottom-nav__label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav__item.is-active {
    color: var(--primary);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
  }

  .mobile-bottom-nav__item.is-active .mobile-bottom-nav__icon {
    color: var(--accent);
    filter: drop-shadow(0 0 6px var(--accent-glow));
  }

  /* FAB rail sizing on mobile — fab-rail.css */
}

@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none;
  }
}

/* Footer copyright — centered with Devra link */
