/**
 * =========================================================
 * Mobile Navigation - Public Site
 * Glass effect bottom bar with 3D colored icons
 * Identical design to user dashboard mobile nav
 * =========================================================
 */

/* ═══════════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAV - GLASS BAR
   ═══════════════════════════════════════════════════════════════════ */
.mobile-nav-public {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed, 100);
  padding: 8px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
}

/* Glass effect bar */
.mobile-nav-public.glass-bar {
  background: rgba(var(--color-surface-rgb, 15, 23, 42), 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow:
    0 -4px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  /* Centered with equal margins */
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: calc(100% - 16px);
  max-width: 500px;
  margin: 0;
}

@media (max-width: 1024px) {
  .mobile-nav-public {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 4px;
  }

  /* Hide desktop nav elements - but NOT navbar-mascot in header! */
  .main-nav-wow,
  .main-nav {
    display: none !important;
  }

  /* Hide old bottom-nav completely */
  .bottom-nav {
    display: none !important;
  }

  /* Add bottom padding to body */
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0));
  }
}

/* Tablet - wider bottom nav */
@media (min-width: 769px) and (max-width: 1024px) {
  .mobile-nav-public.glass-bar {
    max-width: 700px;
    padding: 10px 20px;
  }

  .mobile-nav-item-public {
    min-width: 80px;
    padding: 8px 12px;
  }

  .nav-icon-3d-public {
    width: 36px;
    height: 36px;
  }

  .mobile-nav-item-public span {
    font-size: 11px;
  }
}

@media (min-width: 1025px) {
  .mobile-nav-public,
  .mobile-drawer-overlay,
  .mobile-drawer {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   NAV ITEMS - GLASS BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.mobile-nav-item-public {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  min-width: 60px;
  flex: 1;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: var(--font-medium, 500);
  border: none;
  background: transparent;
  border-radius: var(--radius-xl, 12px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

/* Glass button hover/active */
.mobile-nav-item-public:hover,
.mobile-nav-item-public:focus {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
}

.mobile-nav-item-public.active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   3D COLORED ICONS - RELIEF EFFECT
   ═══════════════════════════════════════════════════════════════════ */
.nav-icon-3d-public {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md, 8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;

  /* 3D relief effect base */
  background: linear-gradient(145deg, rgba(255,255,255,0.15), rgba(0,0,0,0.1));
  box-shadow:
    2px 2px 6px rgba(0, 0, 0, 0.4),
    -1px -1px 4px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.1);
}

.nav-icon-3d-public svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

/* Active state - pressed effect */
.mobile-nav-item-public.active .nav-icon-3d-public {
  box-shadow:
    inset 2px 2px 5px rgba(0, 0, 0, 0.3),
    inset -1px -1px 3px rgba(255, 255, 255, 0.05);
  transform: scale(0.95);
}

.mobile-nav-item-public.active .nav-icon-3d-public svg {
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════
   ICON COLOR THEMES - PUBLIC NAVIGATION
   ═══════════════════════════════════════════════════════════════════ */

/* Home - Blue */
.icon-home-public {
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow:
    3px 3px 10px rgba(59, 130, 246, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-home-public svg {
  stroke: #fff;
}

/* Search/Explore - Cyan */
.icon-search-public {
  background: linear-gradient(145deg, #06b6d4, #0891b2);
  box-shadow:
    3px 3px 10px rgba(6, 182, 212, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-search-public svg {
  stroke: #fff;
}

/* Destinations - Green */
.icon-destinations-public {
  background: linear-gradient(145deg, #22c55e, #16a34a);
  box-shadow:
    3px 3px 10px rgba(34, 197, 94, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-destinations-public svg {
  stroke: #fff;
}

/* Host/List Property - Orange/Gold gradient */
.icon-host-public {
  background: linear-gradient(145deg, #f97316, #ea580c);
  box-shadow:
    3px 3px 10px rgba(249, 115, 22, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-host-public svg {
  stroke: #fff;
}

/* Blog - Pink */
.icon-blog-public {
  background: linear-gradient(145deg, #ec4899, #db2777);
  box-shadow:
    3px 3px 10px rgba(236, 72, 153, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-blog-public svg {
  stroke: #fff;
}

/* Account/Login - Indigo */
.icon-account-public {
  background: linear-gradient(145deg, #6366f1, #4f46e5);
  box-shadow:
    3px 3px 10px rgba(99, 102, 241, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-account-public svg {
  stroke: #fff;
}

/* More - Purple */
.icon-more-public {
  background: linear-gradient(145deg, #a855f7, #7c3aed);
  box-shadow:
    3px 3px 10px rgba(168, 85, 247, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-more-public svg {
  stroke: #fff;
}

/* Contact - Teal */
.icon-contact-public {
  background: linear-gradient(145deg, #14b8a6, #0d9488);
  box-shadow:
    3px 3px 10px rgba(20, 184, 166, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-contact-public svg {
  stroke: #fff;
}

/* FAQ/Help - Slate */
.icon-faq-public {
  background: linear-gradient(145deg, #64748b, #475569);
  box-shadow:
    3px 3px 10px rgba(100, 116, 139, 0.4),
    -2px -2px 6px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2);
}

.icon-faq-public svg {
  stroke: #fff;
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE DRAWER - GLASS PANEL
   ═══════════════════════════════════════════════════════════════════ */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop, 999);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-drawer-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer-overlay[hidden] {
  display: none;
}

.mobile-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-modal, 1000);
  max-height: 85vh;
  border-radius: var(--radius-2xl, 16px) var(--radius-2xl, 16px) 0 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Glass drawer effect */
.mobile-drawer.glass-drawer {
  background: rgba(var(--color-surface-rgb, 15, 23, 42), 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  box-shadow:
    0 -10px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mobile-drawer.open {
  transform: translateY(0);
}

.mobile-drawer[hidden] {
  display: none;
}

/* Drawer Header */
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4, 16px) var(--space-5, 20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  position: relative;
}

.mobile-drawer-header::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full, 9999px);
}

.mobile-drawer-header h3 {
  font-size: var(--text-lg, 1.125rem);
  font-weight: var(--font-semibold, 600);
  color: var(--color-text);
  margin: 0;
}

.mobile-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md, 8px);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text);
}

.mobile-drawer-close svg {
  width: 18px;
  height: 18px;
}

/* Drawer Body */
.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4, 16px);
  padding-bottom: calc(var(--space-4, 16px) + env(safe-area-inset-bottom, 0));
}

/* ═══════════════════════════════════════════════════════════════════
   DRAWER ITEMS
   ═══════════════════════════════════════════════════════════════════ */
.mobile-drawer-item {
  display: flex;
  align-items: center;
  gap: var(--space-4, 16px);
  width: 100%;
  padding: var(--space-3, 12px) var(--space-4, 16px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg, 12px);
  color: var(--color-text);
  font-size: var(--text-sm, 0.875rem);
  font-weight: var(--font-medium, 500);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: var(--space-2, 8px);
}

.mobile-drawer-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

/* Drawer Icon - 3D style */
.mobile-drawer-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md, 8px);
  flex-shrink: 0;
}

.mobile-drawer-icon svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Drawer Divider */
.mobile-drawer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: var(--space-3, 12px) 0;
}

/* ═══════════════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES
   ═══════════════════════════════════════════════════════════════════ */
html[data-theme="solar-pop"] .mobile-nav-public.glass-bar,
html[data-theme="sakura-mist"] .mobile-nav-public.glass-bar,
html[data-theme="desert-sand"] .mobile-nav-public.glass-bar,
html[data-theme="mono-paper"] .mobile-nav-public.glass-bar,
html[data-theme="candy-arcade"] .mobile-nav-public.glass-bar,
html[data-theme="pearl-white"] .mobile-nav-public.glass-bar,
html[data-theme="snow-crystal"] .mobile-nav-public.glass-bar,
html[data-theme="ivory-cream"] .mobile-nav-public.glass-bar,
html[data-theme="rose-gold"] .mobile-nav-public.glass-bar,
html[data-theme="mint-fresh"] .mobile-nav-public.glass-bar,
html[data-theme="lavender-dream"] .mobile-nav-public.glass-bar,
html[data-theme="cloud-nine"] .mobile-nav-public.glass-bar {
  background: rgba(var(--color-bg-rgb), 0.95);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow:
    0 -4px 30px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

html[data-theme="solar-pop"] .mobile-drawer.glass-drawer,
html[data-theme="sakura-mist"] .mobile-drawer.glass-drawer,
html[data-theme="desert-sand"] .mobile-drawer.glass-drawer,
html[data-theme="mono-paper"] .mobile-drawer.glass-drawer,
html[data-theme="candy-arcade"] .mobile-drawer.glass-drawer,
html[data-theme="pearl-white"] .mobile-drawer.glass-drawer,
html[data-theme="snow-crystal"] .mobile-drawer.glass-drawer,
html[data-theme="ivory-cream"] .mobile-drawer.glass-drawer,
html[data-theme="rose-gold"] .mobile-drawer.glass-drawer,
html[data-theme="mint-fresh"] .mobile-drawer.glass-drawer,
html[data-theme="lavender-dream"] .mobile-drawer.glass-drawer,
html[data-theme="cloud-nine"] .mobile-drawer.glass-drawer {
  background: rgba(var(--color-bg-rgb), 0.98);
  border-color: rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   LANDSCAPE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════════ */
@media (max-height: 500px) and (orientation: landscape) {
  .mobile-nav-public {
    padding: 6px 10px;
  }

  .nav-icon-3d-public {
    width: 28px;
    height: 28px;
  }

  .nav-icon-3d-public svg {
    width: 16px;
    height: 16px;
  }

  .mobile-nav-item-public {
    padding: 4px 6px;
    min-width: 50px;
  }

  .mobile-nav-item-public span:not(.mobile-badge) {
    font-size: 9px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   DRAWER ALTERNATIVE STRUCTURE (autentificare, etc.)
   ═══════════════════════════════════════════════════════════════════ */
.mobile-drawer .drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: -1;
}

.mobile-drawer.open .drawer-overlay {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer .drawer-content {
  position: relative;
  background: transparent;
  z-index: 1;
}

.mobile-drawer .drawer-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.mobile-drawer .drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.mobile-drawer .drawer-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.mobile-drawer .drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer .drawer-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text);
}

.mobile-drawer .drawer-close svg {
  width: 18px;
  height: 18px;
}

.mobile-drawer .drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.mobile-drawer .drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-drawer .drawer-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.mobile-drawer .drawer-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.15), rgba(0,0,0,0.1));
  box-shadow:
    2px 2px 6px rgba(0, 0, 0, 0.4),
    -1px -1px 4px rgba(255, 255, 255, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.1);
}

.mobile-drawer .drawer-icon svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Drawer Icon Colors - inherit from nav icon colors */
.mobile-drawer .icon-blog-public { background: linear-gradient(145deg, #f97316, #ea580c); }
.mobile-drawer .icon-destinations-public { background: linear-gradient(145deg, #ef4444, #dc2626); }
.mobile-drawer .icon-offers-public { background: linear-gradient(145deg, #f59e0b, #d97706); }
.mobile-drawer .icon-about-public { background: linear-gradient(145deg, #3b82f6, #2563eb); }
.mobile-drawer .icon-contact-public { background: linear-gradient(145deg, #10b981, #059669); }
.mobile-drawer .icon-faq-public { background: linear-gradient(145deg, #8b5cf6, #7c3aed); }
.mobile-drawer .icon-login-public { background: linear-gradient(145deg, #6366f1, #4f46e5); }

/* ═══════════════════════════════════════════════════════════════════
   HIDE AUTH LINKS ON AUTH PAGES
   Hide login/register links when already on those pages
   ═══════════════════════════════════════════════════════════════════ */
/* Hide auth link when on auth pages - controlled by body class or page context */
body[data-page="auth"] .drawer-link[data-page="autentificare"],
body.page-auth .drawer-link[data-page="autentificare"],
.drawer-link.active[data-page="autentificare"] {
  display: none !important;
}

/* Also hide the divider before auth link on those pages */
body[data-page="auth"] .drawer-nav .drawer-divider:last-of-type,
body.page-auth .drawer-nav .drawer-divider:last-of-type {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   HIDE ENTIRE MOBILE NAV ON AUTH PAGES
   No bottom navigation on login/register/password pages
   ═══════════════════════════════════════════════════════════════════ */
body[data-page="auth"] .mobile-nav-public,
body.page-auth .mobile-nav-public,
body[data-page="auth"] .mobile-drawer,
body.page-auth .mobile-drawer,
body[data-page="auth"] .mobile-drawer-overlay,
body.page-auth .mobile-drawer-overlay {
  display: none !important;
}

/* Remove bottom padding on auth pages since no mobile nav */
body[data-page="auth"],
body.page-auth {
  padding-bottom: 0 !important;
}

