/* ============================================================================
   STYLE.CSS - Main stylesheet
   Load order: style.css → mobile.css (if < 768px) → desktop.css (if >= 768px)
   ============================================================================ */

/* CSS Variables */
:root {
  color-scheme: light dark;

  /* Colors - Can be overridden by inline styles in layout.php */
  --primary: #3b82f6;
  --primary-dark: #1e3a8a;
  --primary-light: #eff6ff;
  --accent: #10b981;
  --accent-dark: #059669;
  
  /* Neutral colors */
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-light: #6b7280;
  --muted: #6b7280;
  --stroke: rgba(0,0,0,.08);
  --accent-light: rgba(0, 0, 0, 0.05);
  
  /* Status colors - Success */
  --success: #10b981;
  --success-dark: #059669;
  --success-darker: #16a34a;
  --success-bg: #f0fdf4;
  --success-bg-strong: #d1fae5;
  --success-border: #bbf7d0;
  
  /* Status colors - Error */
  --error: #dc2626;
  --error-dark: #ef4444;
  --error-bg: #fef2f2;
  --error-bg-strong: #fee2e2;
  --error-border: #fecaca;
  
  /* Status colors - Warning */
  --warning: #d97706;
  --warning-dark: #b45309;
  --warning-darker: #92400e;
  --warning-bg: #fef3c7;
  --warning-bg-strong: #fde68a;
  
  /* Status colors - Info */
  --info: #2563eb;
  --info-dark: #4f46e5;
  --info-bg: #dbeafe;
  --info-bg-strong: #e0e7ff;
  
  /* Chat colors */
  --chat-bg: #f0f0f0;
  --chat-bubble-sent: var(--primary);
  --chat-bubble-received: #e5e7eb;
  --chat-time: #8e8e93;
  --chat-muted: #9ca3af;
  
  /* UI colors - Will be overridden by dynamic theme */
  --topbar-bg: #1e3a8a;
  --topbar-text: #ffffff;
  --bottom-nav-bg: #1e3a8a;
  --bottom-nav-text: rgba(255,255,255,0.7);
  --bottom-nav-active: #ffffff;
  
  /* Spacing */
  --radius: 16px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --card: #2c2c2e;
    --text: #f5f5f5;
    --text-light: #a1a1a1;
    --muted: #a1a1a1;
    --stroke: rgba(255,255,255,.12);
    
    /* Lighter primary for readability on dark backgrounds */
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #1e3a5f;
    --accent-light: #3a3a3c;
    
    /* Adjusted status colors for dark mode */
    --success: #34d399;
    --success-dark: #10b981;
    --success-darker: #34d399;
    --success-bg: #052e16;
    --success-bg-strong: #14532d;
    --success-border: #166534;
    
    --error: #f87171;
    --error-dark: #ef4444;
    --error-bg: #450a0a;
    --error-bg-strong: #7f1d1d;
    --error-border: #991b1b;
    
    --warning: #fbbf24;
    --warning-dark: #f59e0b;
    --warning-bg: #451a03;
    --warning-bg-strong: #78350f;
    
    --info: #60a5fa;
    --info-dark: #3b82f6;
    --info-bg: #1e1b4b;
    --info-bg-strong: #312e81;
    
    --chat-bg: #1c1c1e;
    --chat-bubble-received: #3a3a3c;
    --chat-bubble-sent: #2563eb;
  }
}

/* ============================================================================
   SKIP TO CONTENT
   ============================================================================ */

.skip-to-content {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 999999;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* ============================================================================
   FOCUS-VISIBLE STATES
   ============================================================================ */

/* Buttons and links */
a:focus-visible,
button:focus-visible,
.btn-login:focus-visible,
.btn-magic-link:focus-visible,
.btn-pay:focus-visible,
.btn-add:focus-visible,
.btn-next:focus-visible,
.btn-submit:focus-visible,
.btn-back:focus-visible,
.btn-add-guest:focus-visible,
.sheet-add-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Navigation items */
.sidebar-nav-item:focus-visible,
.bottom-nav-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

/* Topbar and pill buttons */
.pill-btn:focus-visible,
.back-button:focus-visible,
.back-button-desktop:focus-visible,
.search-overlay-close:focus-visible,
.sidebar-nav-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Form elements */
.form-input:focus-visible,
.search-input:focus-visible,
.chat-input-wrapper textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Modal close buttons */
.welcome-modal-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 50%;
}

/* Tiles and cards */
.tile:focus-visible,
.nearby-tile:focus-visible,
.product-tile:focus-visible,
.highlight-slide:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Filter pills */
.tag-filter-pill:focus-visible,
.category-filter-pill:focus-visible,
.highlight-dot:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Quantity buttons */
.qty-btn:focus-visible,
.chat-send-btn:focus-visible,
.chat-attach-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reset */
* {
  box-sizing: border-box;
}

/* Base Body Styles */
html {
  overscroll-behavior: none;
  overflow: hidden;
  height: 100%;
  min-height: -webkit-fill-available;
  background: var(--bg);
}

body {
  overscroll-behavior: none;
  overflow: auto;
  height: 100%;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Search highlight */
mark {
  background: rgba(var(--primary-rgb, 59, 130, 246), 0.15);
  color: var(--primary);
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  mark {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
  }
}

/* ============================================
   SEARCH COMPONENTS (shared mobile + desktop)
   ============================================ */

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}

.search-clear:hover {
  background: var(--accent-light);
  color: var(--text);
}

/* Search results dropdown */
.search-results:not(.search-results-mobile) {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  z-index: 100;
}

/* Search results list (overlay) */
.search-results-mobile {
  position: relative;
  flex: 1;
  background: var(--card);
  overflow-y: auto;
  display: block;
}

.search-results-mobile:empty {
  display: none !important;
}

/* Search empty state */
.search-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--chat-muted);
  pointer-events: none;
}

.search-empty-state i {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
  display: block;
}

.search-empty-state p {
  font-size: 15px;
  margin: 0;
  opacity: 0.7;
}

.search-results-mobile:not(:empty) ~ .search-empty-state {
  display: none;
}

/* Search result items */
.search-result-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--stroke);
  transition: background .1s ease;
  background: var(--card);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--accent-light);
}

.search-result-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--accent-light);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--primary);
}

.search-result-icon i {
  font-size: 18px;
}

@media (prefers-color-scheme: dark) {
  .search-result-icon {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
  }
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 3px;
  color: var(--text);
}

.search-result-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-no-results {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Base Typography */
.h1 { 
  font-size: 26px; 
  margin: 18px 0; 
}

.page-header {
  margin-bottom: 32px;
}

.page-header .h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.page-description {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin-top: 34px;
  max-width: 700px;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
}

/* Grid System */
.grid-wrapper {
  display: block;
  width: 100%;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  box-sizing: border-box;
}

@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Hero Image - base styling */
.hero {
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* Tiles */
.tile {
  display: block;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  transition: transform .08s ease, border-color .08s ease, box-shadow .08s ease;
  color: var(--text);
  position: relative;
  /* Square aspect ratio using padding-bottom (Android compatible) */
  padding-bottom: 100%;
  height: 0;
  overflow: hidden;
}

.tile-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
}

.tile:hover { 
  transform: translateY(-2px); 
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

/* Button tiles (when tile needs onclick instead of href) */
button.tile {
  width: 100%;
  height: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  padding-bottom: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.tile-icon {
  width: 50%;
  aspect-ratio: 1;
  display: grid; 
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  margin: 0 auto 12px auto;
  background: var(--accent-light);
}

.tile-icon i { 
  font-size: clamp(20px, 10vw, 32px);
  color: var(--primary);
}

/* Tile with image instead of icon */
.tile-image {
  width: 80%;
  aspect-ratio: 1;
  margin: 0 auto 12px auto;
  border-radius: 20%;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-title { 
  font-weight: 700; 
  font-size: clamp(13px, 3.5vw, 15px);
  line-height: 1.25;
  word-break: break-word;
  hyphens: auto;
}

.tile-desc { 
  color: var(--muted); 
  font-size: 14px; 
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tile with image - cleaner look without border/background */
.tile-has-image {
  background: transparent;
  border: none;
  box-shadow: none;
}

.tile-has-image:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: none;
}

.tile-has-image .tile-image {
  width: 80%;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tile-has-image:hover .tile-image {
  transform: scale(1.03);
  box-shadow: 0 5px 16px rgba(0,0,0,0.15);
}

/* Mixed grid - align icon tiles with image tiles */
.grid-mixed .tile:not(.tile-has-image) .tile-icon {
  width: 70%;
  border-radius: 14px;
}

/* Page Article - base (mobile styling in mobile.css) */
.page-article {
  display: block;
  position: relative;
  margin-top: 24px;
}

/* Reduce top spacing on booking page */
.page-article:has(.booking-subbar) {
    margin-top: 0;
}

.content:has(.booking-subbar) {
    margin-top: 8px;
}

/* Booking date subbar */
.booking-subbar {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    padding: 8px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--stroke);
}

.booking-subbar i {
    font-size: 11px;
    margin-right: 3px;
}

/* Ensure content after grid doesn't overlap - Android fix */
.grid-wrapper + .page-article,
.grid-wrapper + article,
.grid + .page-article,
.grid + article,
.content-after-grid {
  margin-top: 32px;
  display: block;
  position: relative;
}

/* Content Typography */
.content {
  margin-top: 24px;
  line-height: 1.7;
  color: var(--text);
}

.content > *:first-child { margin-top: 0; }
.content > *:last-child { margin-bottom: 0; }

.content h2 {
  font-size: 24px;
  margin: 32px 0 16px;
  font-weight: 700;
}

.content h3 {
  font-size: 20px;
  margin: 28px 0 14px;
  font-weight: 600;
}

.content p { 
  color: var(--text); 
  line-height: 1.7;
  margin: 16px 0;
}

.content ul, .content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.content li {
  margin: 8px 0;
  line-height: 1.6;
}

.content a { 
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}

.content a:hover {
  border-bottom-color: var(--primary);
}

.content code {
  background: var(--accent-light);
  border: 1px solid var(--stroke);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--text);
}

.content pre {
  background: var(--accent-light);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}

.content pre code {
  background: none;
  border: none;
  padding: 0;
}

.content blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--muted);
  font-style: italic;
}

/* Dark mode: force readable text on CMS elements with inline backgrounds */
@media (prefers-color-scheme: dark) {
  .content [style*="background-color"],
  .content [style*="background:"] {
    color: #1f2937 !important;
  }
  .content [style*="background-color"] *,
  .content [style*="background:"] * {
    color: #1f2937 !important;
  }
  .content [style*="background-color"] a,
  .content [style*="background:"] a {
    color: #1e40af !important;
  }
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.content img.greeting-avatar {
  margin: 0;
  border-radius: 50%;
  max-width: none;
}

.content img.info-icon-img {
  margin: 0;
  border-radius: 10px;
  max-width: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content hr {
  border: none;
  border-top: 1px solid var(--stroke);
  margin: 32px 0;
}

/* Footer */
.footer { 
  border-top: 1px solid var(--stroke); 
  margin-top: 60px;
  padding: 12px 0;
  min-height: 40px;
}

.footer .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Guidebook Header & Footer */
.guidebook-header,
.guidebook-footer {
  padding: 20px 16px;
  background: var(--accent-light);
  border-radius: 12px;
  border: none;
}

.guidebook-header {
  margin: 0 0 20px 0;
}

.guidebook-footer {
  margin: 20px 0 0 0;
}

.guidebook-header p:first-child,
.guidebook-footer p:first-child {
  margin-top: 0;
}

.guidebook-header p:last-child,
.guidebook-footer p:last-child {
  margin-bottom: 0;
}

.guidebook-header h1,
.guidebook-header h2,
.guidebook-header h3,
.guidebook-footer h1,
.guidebook-footer h2,
.guidebook-footer h3 {
  margin-top: 0;
}

.guidebook-header ul,
.guidebook-header ol,
.guidebook-footer ul,
.guidebook-footer ol {
  margin: 12px 0;
  padding-left: 24px;
}

.guidebook-header a,
.guidebook-footer a {
  color: var(--primary);
  text-decoration: underline;
}

/* ============================================================
   TILE BADGES - Tip Badge (Top-right on Tile)
   ============================================================ */

/* Tile container - position relative is set in main .tile definition */

/* Title row */
.tile-title-row {
  display: flex;
  align-items: center;
  width: 100%;
}

/* Title */
.tile-title {
  flex: 1;
  min-width: 0; /* Allow text truncation */
}

/* Badge positioning (top-right) */
.tile-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  z-index: 2;
  gap: 4px;
}

/* Tip badge - pill with star + text */
.tile-badge-tip {
  top: 12%;
  right: 12%;
  background: #f59e0b;
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  gap: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.tile-badge-tip::after {
  content: 'Tip';
}

/* Category pill - positioned on tile image/icon (topbar pill style) */
.tile-category-pill {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  line-height: 1.2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-image,
.tile-icon {
  position: relative;
}

/* Page Badges Container */
.page-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

/* Host Tip Badge on page */
.host-tip-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--warning-bg);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--warning);
}

.host-tip-badge i {
  font-size: 10px;
  color: var(--warning-dark);
}

/* Page Tags Footer */
.page-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--stroke, #e5e7eb);
}

.page-tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--accent-light, rgba(0, 0, 0, 0.05));
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  border: 1px solid var(--stroke);
}

/* Tag Filter Bar */
.tag-filter-bar {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tag-filter-bar::-webkit-scrollbar {
  display: none;
}

.tag-filter-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: var(--accent-light, rgba(0, 0, 0, 0.06));
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-filter-pill:hover {
  background: var(--stroke);
  color: var(--text);
}

.tag-filter-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.tag-filter-remove {
  display: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 9px;
  transition: background 0.15s ease;
}

.tag-filter-pill.active .tag-filter-remove {
  display: inline-flex;
}

.tag-filter-pill.active:hover .tag-filter-remove {
  background: rgba(255, 255, 255, 0.4);
}

/* Powered by branding */
.powered-by {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 40px 20px 100px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.4;
  letter-spacing: 0.3px;
}

.powered-by > span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.powered-by a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.3px;
}

.powered-by .hej {
  color: var(--primary);
  opacity: 0.6;
  font-weight: 700;
  text-transform: none;
}
/* ============================================================================
   Welcome Modal
   ============================================================================ */

.welcome-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.welcome-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.welcome-modal {
  background: var(--card);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s ease;
}

.welcome-modal-overlay.show .welcome-modal {
  transform: scale(1) translateY(0);
}

.welcome-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--accent-light);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.15s ease;
  z-index: 10;
}

.welcome-modal-close:hover {
  background: var(--stroke);
  color: var(--text);
}

.welcome-modal-content {
  padding: 48px 28px 24px;
  overflow-y: auto;
  flex: 1;
  color: var(--text);
  line-height: 1.6;
}

.welcome-modal-content h2,
.welcome-modal-content h3 {
  margin: 0 0 16px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.welcome-modal-content p {
  margin: 0 0 14px 0;
  font-size: 15px;
}

.welcome-modal-content ul {
  margin: 0 0 14px 0;
  padding-left: 20px;
}

.welcome-modal-content li {
  margin-bottom: 8px;
  font-size: 15px;
}

.welcome-modal-content a {
  color: var(--primary, #3b82f6);
  text-decoration: none;
}

.welcome-modal-content a:hover {
  text-decoration: underline;
}

.welcome-modal-content img {
  border-radius: 50%;
}

.welcome-modal-content table {
  width: 100%;
}

.welcome-modal-btn {
  margin: 0 28px 28px;
  padding: 14px 24px;
  background: var(--primary, #3b82f6);
  color: var(--topbar-text, #ffffff);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.welcome-modal-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .welcome-modal {
    border-radius: 16px;
    max-height: calc(100vh - 24px);
  }
  
  .welcome-modal-content {
    padding: 40px 20px 20px;
  }
  
  .welcome-modal-content h2,
  .welcome-modal-content h3 {
    font-size: 22px;
  }
  
  .welcome-modal-btn {
    margin: 0 20px 20px;
  }
}

/* ============================================================================
   Sidebar
   ============================================================================ */

.sidebar-nav-divider {
  height: 1px;
  background: var(--stroke);
  margin: 12px 16px;
}

.sidebar-footer {
  padding: 12px 8px;
  margin-top: auto;
}

.sidebar-footer-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.15s ease;
  font-size: 14px;
}

.sidebar-footer-btn:hover {
  background: var(--accent-light);
}

.sidebar-footer-btn i {
  width: 20px;
  text-align: center;
  color: var(--muted);
}

.sidebar-logout {
  color: var(--error, #ef4444);
}

.sidebar-logout i {
  color: var(--error, #ef4444);
}

/* ============================================================================
   Portal Badges (sidebar)
   ============================================================================ */

.portal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

.portal-badge.warning {
  background: var(--warning-bg);
  color: var(--warning-dark);
}

.portal-badge.info {
  background: var(--info-bg);
  color: var(--info);
}

.portal-badge.pending {
  background: var(--info-bg-strong);
  color: var(--info-dark);
  min-width: 20px;
  padding: 0;
}

/* ============================================================================
   Mobile Menu Toggle & Sidebar Overlay
   ============================================================================ */

.menu-toggle-mobile {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 20px;
  padding: 8px;
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 1023px) {
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
  }
  .sidebar-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* ============================================================================
   Floating Pill (desktop - search + menu over hero)
   ============================================================================ */

.floating-pill-desktop {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 50;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media (min-width: 1024px) {
  .floating-pill-desktop {
    display: flex;
    align-items: center;
    gap: 0;
  }
  body:not(.has-hero) .floating-pill-desktop {
    display: none;
  }
}

.pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================================================
   Nav Badge (unread count)
   ============================================================================ */

.bottom-nav-item {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(12px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--error-dark);
  color: white;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================================
   Topbar Host Info (chat page)
   ============================================================================ */

.topbar-host-info {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.topbar-host-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar-host-avatar.placeholder {
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.topbar-host-name {
  font-size: 15px;
  font-weight: 600;
  color: inherit;
}

.topbar .container {
  position: relative;
}
/* ============================================================================
   LOCAL GUIDE STYLES
   Discover the Area / Explore section
   ============================================================================ */

/* Local Guide Intro */
.local-guide-intro {
  margin-bottom: 24px;
}

.local-guide-intro .content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.local-guide-intro .content h2 {
  font-size: 20px;
  margin: 0 0 12px;
}

.local-guide-intro .content p {
  margin: 0 0 12px;
  color: var(--text-light);
}

.local-guide-intro .content p:last-child {
  margin-bottom: 0;
}

/* ============================================================================
   Category Back Bar
   ============================================================================ */

.category-back-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--stroke);
}

.category-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--accent-light);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-back-btn:hover {
  background: var(--stroke);
  color: var(--text);
}

.category-back-btn i {
  font-size: 12px;
}

.category-current-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================================
   Category Filter Bar (top row with icons)
   ============================================================================ */

.nearby-filters {
  margin-bottom: 20px;
}

.category-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: relative;
  mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
  padding-right: 32px;
}

.category-filter-bar::-webkit-scrollbar {
  display: none;
}

.category-filter-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: 1px solid var(--stroke);
  border-radius: 24px;
  background: var(--accent-light);
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.category-filter-pill i {
  font-size: 14px;
}

.category-filter-pill:hover {
  background: var(--stroke);
  color: var(--text);
}

.category-filter-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================================================
   Tag Filter Bar (overrides for local guide context)
   ============================================================================ */

.tag-filter-section {
  padding: 8px 0 0;
}

.tag-filter-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.nearby-filters .tag-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-filter-section .tag-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
}

.nearby-filters .tag-filter-pill,
.tag-filter-section .tag-filter-pill {
  padding: 6px 12px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid var(--stroke);
  font-size: 12px;
  color: var(--muted);
}

.nearby-filters .tag-filter-pill:hover,
.tag-filter-section .tag-filter-pill:hover {
  background: var(--accent-light);
  color: var(--text);
  border-color: var(--text-light);
}

.nearby-filters .tag-filter-pill.active,
.tag-filter-section .tag-filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.nearby-filters .tag-filter-pill .tag-filter-remove {
  display: none;
}

.nearby-filters .tag-filter-pill.active .tag-filter-remove {
  display: inline-flex;
}

.tag-filter-pill-tip {
  border-color: #f59e0b;
  color: #b45309;
}

.tag-filter-pill-tip i {
  color: #f59e0b;
}

.tag-filter-pill-tip.active {
  background: #f59e0b !important;
  border-color: #f59e0b !important;
  color: white !important;
}

.tag-filter-pill-tip.active i {
  color: white;
}

/* Collapsible tag bar - max 2 rows */
.tag-filter-bar--collapsible {
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.tag-filter-bar--collapsible.collapsed {
  /* max-height set dynamically by JS based on 2-row height */
}

.tag-show-more {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0 0;
  margin: 0 auto;
  display: block;
}

.tag-show-more:hover {
  text-decoration: underline;
}

/* ============================================================================
   Nearby Grid
   ============================================================================ */

.nearby-grid-wrapper {
  margin: 0 -16px;
  padding: 0 16px;
}

.nearby-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .nearby-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================================
   Nearby Tile - Clean Card Style
   ============================================================================ */

/* nearby-tile now inherits from .tile - no overrides needed */

/* Badge */
.nearby-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.nearby-badge-tip {
  background: linear-gradient(135deg, var(--warning), var(--warning-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Tile Image */
.nearby-tile-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.nearby-tile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.nearby-tile:hover .nearby-tile-image img {
  transform: scale(1.05);
}

/* Tile Icon (when no image) */
.nearby-tile-icon {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--icon-color), color-mix(in srgb, var(--icon-color) 70%, black));
  color: white;
  font-size: 36px;
}

/* Tile Content */
.nearby-tile-content {
  padding: 14px;
}

.nearby-tile-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--cat-color);
  margin-bottom: 4px;
}

.nearby-tile-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* Empty State */
.nearby-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.nearby-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.nearby-empty p {
  font-size: 16px;
}

/* ============================================================================
   LOCAL GUIDE DETAIL PAGE
   ============================================================================ */

.local-guide-detail {
  /* No padding needed - content card handles spacing */
}

/* Inline badge for items without hero image */
.detail-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--warning), var(--warning-dark));
  color: white;
  border-radius: 16px;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 12px;
}

.detail-badge-inline i {
  font-size: 11px;
}

/* Content */
.detail-content {
  padding: 0 4px;
}

.detail-header {
  margin-bottom: 20px;
}

.detail-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.detail-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cat-color);
  text-decoration: none;
  cursor: pointer;
}

.detail-category i {
  font-size: 11px;
}

.detail-distance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  padding: 6px 14px;
  background: var(--accent-light, rgba(0, 0, 0, 0.04));
  text-decoration: none;
  cursor: pointer;
  border-radius: 20px;
}

.detail-distance i {
  font-size: 12px;
  color: var(--primary);
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.2;
}

.detail-subtitle {
  font-size: 16px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

/* Location */
.detail-location {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  background: var(--accent-light);
  border-radius: var(--radius);
  margin-top: 24px;
}

.detail-location > i {
  color: var(--primary);
  font-size: 16px;
  margin-top: 2px;
}

.detail-location span {
  font-size: 15px;
  color: var(--text);
}

.detail-city {
  display: block;
  color: var(--text-light);
  font-size: 14px;
  margin-top: 2px;
}

/* Action Buttons */
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.detail-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent-light);
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.detail-actions {
  flex-direction: column;
}

.detail-action-btn {
  width: 100%;
}

.detail-action-btn:hover {
  background: var(--stroke);
  color: var(--text);
}

.detail-action-btn i {
  font-size: 14px;
}

.detail-action-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.detail-action-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
}

.detail-map {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 24px;
}

.detail-map-home-icon {
  background: var(--primary, #3b82f6);
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
}

/* Overview Map (local guide category page) */
.overview-map-container {
  margin-top: 32px;
  padding-bottom: 8px;
}

.overview-map {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
}

.overview-map-marker-wrap {
  background: none !important;
  border: none !important;
}

/* Marker clusters */
.hej-cluster-wrap {
  background: none !important;
  border: none !important;
}

.hej-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 2px solid #fff;
  transition: transform 0.15s ease;
}

.hej-cluster-small {
  width: 36px;
  height: 36px;
  background: var(--primary, #3b82f6);
}

.hej-cluster-medium {
  width: 42px;
  height: 42px;
  font-size: 14px;
  background: var(--primary, #3b82f6);
}

.hej-cluster-large {
  width: 48px;
  height: 48px;
  font-size: 15px;
  background: #1d4ed8;
}

/* Hide default MarkerCluster styles */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  display: none !important;
}

.overview-map-marker-inner {
  width: 36px;
  height: 36px;
  background: none !important;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.overview-map-marker-inner i {
  font-size: 22px;
  color: inherit;
}

/* Active marker pill on detail page */
.map-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  background: var(--card, #ffffff);
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1f2937);
  line-height: 1;
}

.map-active-pill i {
  font-size: 14px;
  color: var(--pill-color, var(--primary));
}

/* Map tooltip with image */
.map-tooltip-wrap {
  padding: 0 !important;
  border: none !important;
  background: var(--card, #ffffff) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden;
  pointer-events: auto !important;
  transition: opacity 0.15s ease;
  white-space: normal !important;
}

.map-tooltip-wrap::before {
  border-top-color: var(--card, #ffffff) !important;
}

.map-tooltip {
  display: flex;
  flex-direction: column;
  max-width: 280px;
  padding: 6px;
}

.map-tooltip-media {
  position: relative;
}

.map-tooltip img {
  width: 268px;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.map-tooltip-body {
  padding: 8px 10px;
}

.map-tooltip-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.map-tooltip-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1f2937);
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}

.map-tooltip-distance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light, #9ca3af);
  white-space: nowrap;
  flex-shrink: 0;
}

.map-tooltip-distance i {
  font-size: 10px;
}

.map-tooltip-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-light, #6b7280);
  margin-top: 4px;
  max-height: 136px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
}

.map-tooltip-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary, #3b82f6);
  margin-top: 6px;
}

.map-tooltip-more i {
  font-size: 10px;
}

.map-tooltip-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--stroke, rgba(0,0,0,.08));
}

.map-tooltip-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: inherit;
}

.map-tooltip-cat i {
  font-size: 10px;
}

.map-tooltip-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-light, #f3f4f6);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-light, #6b7280);
}

.map-tooltip-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #f59e0b;
  color: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.map-tooltip-badge i {
  font-size: 9px;
}

.overview-map-home {
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--primary, #3b82f6);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

/* Body Content */
.detail-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 24px;
}

.detail-body p {
  margin: 0 0 16px;
}

.detail-body p:last-child {
  margin-bottom: 0;
}

.detail-body h2, .detail-body h3 {
  margin: 24px 0 12px;
  color: var(--text);
}

.detail-body ul, .detail-body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.detail-body li {
  margin-bottom: 8px;
}

/* Tags */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--stroke);
}

.detail-tag {
  padding: 6px 14px;
  background: var(--accent-light);
  color: var(--text-light);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.detail-tag:hover {
  background: var(--stroke);
  color: var(--text);
}

/* Desktop */
@media (min-width: 768px) {
  .detail-title {
    font-size: 32px;
  }
  
  .detail-hero {
    border-radius: calc(var(--radius) * 1.5);
  }
}


/**
 * Portal Styles - Extends guidebook base styling
 * Uses same CSS variables and design patterns as guidebook
 */

/* ============================================
   UTILITY CLASSES
   ============================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   BOOKING DATES CARD
   ============================================ */

/* ============================================
   BOOKING GREETING
   ============================================ */
.booking-greeting {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 4px;
}

.greeting-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    margin: 0;
}

.greeting-text {
    flex: 1;
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    padding: 12px 16px;
}

.greeting-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
}

.greeting-sub {
    font-size: 14px;
    color: var(--text);
    margin: 2px 0 0;
    line-height: 1.4;
}

.greeting-reply {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    margin-top: 6px;
}

.greeting-reply:hover {
    text-decoration: underline;
}

.greeting-reply i {
    font-size: 10px;
}

/* Image inside info-icon (listing photo) */
.info-icon-img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

/* ============================================
   INFO ROWS (used on overview, invoice, etc)
   ============================================ */
.info-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--stroke);
}

.info-row:last-child {
    border-bottom: none;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon i {
    font-size: 16px;
    color: var(--primary);
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--muted);
}

.info-value {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.info-sub {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

.info-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--accent-light);
    border-radius: 10px;
    transition: background 0.15s;
}

.info-action:hover {
    background: rgba(var(--primary-rgb), 0.15);
}

/* ============================================
   ACTION BUTTONS (booking page portal links)
   ============================================ */
.action-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 10px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.action-row:last-child {
    margin-bottom: 0;
}

.action-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-row:active {
    transform: scale(0.98);
}

.action-row-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-row-icon i {
    font-size: 20px;
    color: var(--primary);
}

.action-row-icon--success {
    background: var(--success-bg-strong);
}

.action-row-icon--success i {
    color: var(--success-dark);
}

.action-row-icon--warning {
    background: var(--warning-bg);
}

.action-row-icon--warning i {
    color: var(--warning);
}

.action-row-icon--info {
    background: var(--info-bg);
}

.action-row-icon--info i {
    color: var(--info);
}

.action-row-content {
    flex: 1;
    min-width: 0;
}

.action-row-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.action-row-desc {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-top: 1px;
}

.action-row-chevron {
    font-size: 14px;
    color: var(--muted);
    flex-shrink: 0;
}

.action-row-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--error-dark);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================
   PORTAL GRID TILES (status indicators)
   ============================================ */
.portal-grid {
    margin-bottom: 24px;
}

.portal-grid .tile-icon {
    background: var(--accent-light);
    border: none;
}

.portal-grid .tile-icon-success {
    background: var(--success-bg-strong);
}

.portal-grid .tile-icon-success i {
    color: var(--success-dark);
}

.portal-grid .tile-icon-warning {
    background: var(--warning-bg);
}

.portal-grid .tile-icon-warning i {
    color: var(--warning);
}

.portal-grid .tile-icon-pending {
    background: var(--info-bg-strong);
}

.portal-grid .tile-icon-pending i {
    color: var(--info-dark);
}

.portal-grid .tile-icon-info {
    background: var(--info-bg);
}

.portal-grid .tile-icon-info i {
    color: var(--info);
}

.portal-grid .tile-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--error-dark);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   HOST BLOCK
   ============================================ */
.host-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.host-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.host-avatar-placeholder {
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.host-avatar-placeholder i {
    font-size: 20px;
    color: var(--primary);
}

.host-info {
    flex: 1;
}

.host-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--muted);
}

.host-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.host-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.host-btn:hover {
    opacity: 0.9;
    color: white;
}

@media (max-width: 480px) {
    .host-block {
        flex-wrap: wrap;
    }
    .host-btn {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
}

/* ============================================
   BALANCE CARD (invoice page)
   ============================================ */
.balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 32px;
}

.balance-card.balance-due {
    background: linear-gradient(135deg, var(--warning-bg) 0%, var(--warning-bg-strong) 100%);
}

.balance-card.balance-paid {
    background: linear-gradient(135deg, var(--success-bg-strong) 0%, var(--success-border) 100%);
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--warning-darker);
}

.balance-amount.credit {
    color: var(--success-dark);
}

.balance-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--success-dark);
}

.btn-pay {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn-pay:hover {
    opacity: 0.9;
    color: white;
}

@media (max-width: 480px) {
    .balance-card {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .btn-pay {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--stroke);
}

.section-title:first-of-type {
    margin-top: 0;
}

/* ============================================
   CHARGES & PAYMENTS LISTS
   ============================================ */
.charges-list, .payments-list {
    margin-bottom: 24px;
}

.charge-group {
    margin-bottom: 16px;
}

.charge-group-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
}

.charge-row, .payment-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--stroke);
}

.charge-row:last-child, .payment-row:last-child {
    border-bottom: none;
}

.charge-info, .payment-info {
    flex: 1;
    min-width: 0;
}

.charge-name, .payment-type {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.charge-detail, .payment-detail {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.charge-amount, .payment-amount {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.payment-row {
    gap: 12px;
}

.payment-row.pending {
    opacity: 0.6;
}

.payment-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-icon.success {
    background: var(--success-bg-strong);
    color: var(--success-dark);
}

.payment-icon.refund {
    background: var(--error-bg-strong);
    color: var(--error);
}

.payment-icon i {
    font-size: 12px;
}

.payment-amount {
    font-weight: 600;
    color: var(--success-dark);
}

.payment-amount.refund {
    color: var(--error);
}

.status-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    background: var(--warning-bg);
    color: var(--warning-dark);
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Totals */
.total-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 0;
    margin-top: 12px;
    border-top: 2px solid var(--stroke);
    font-weight: 600;
    font-size: 15px;
}

.total-row.paid {
    color: var(--success-dark);
}

/* Summary Box */
.summary-box {
    background: var(--accent-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text);
}

.summary-row.final {
    padding: 12px 0 0;
    margin-top: 8px;
    border-top: 2px solid var(--stroke);
    font-size: 17px;
    font-weight: 700;
}

.summary-row.final.due {
    color: var(--warning-dark);
}

.summary-row.final.paid {
    color: var(--success-dark);
}

.text-success {
    color: var(--success-dark);
}

/* ============================================
   EMPTY STATE & HELP TEXT
   ============================================ */
.empty-state {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    padding: 24px;
    background: var(--accent-light);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.help-text {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 32px;
}

.help-text i {
    margin-right: 4px;
}

.help-text a {
    color: var(--primary);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* ============================================
   EXTRAS PAGE
   ============================================ */
.extras-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--stroke);
}

.extras-section-title:first-of-type {
    margin-top: 0;
}

.extras-section-title .badge {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
    text-transform: none;
    letter-spacing: 0;
}

/* Ordered items list */
.ordered-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.ordered-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
}

.ordered-image {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.ordered-image.placeholder {
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ordered-image.placeholder i {
    font-size: 20px;
    color: var(--muted);
}

.ordered-details {
    flex: 1;
    min-width: 0;
}

.ordered-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.ordered-qty {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.ordered-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.ordered-total {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--accent-light);
    border-radius: var(--radius);
    font-weight: 600;
}

/* Product cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.product-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.product-card:hover {
    border-color: rgba(0,0,0,.12);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.product-image.placeholder {
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image.placeholder i {
    font-size: 32px;
    color: var(--muted);
}

.product-content {
    padding: 16px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}

.product-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
    margin: 0 0 12px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.product-price .unit {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}

.btn-add {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-add:hover {
    opacity: 0.9;
}

.btn-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   CHAT PAGE
   ============================================ */
.chat-wrapper {
    margin: -24px;
    margin-bottom: 0;
    width: calc(100% + 48px);
    height: calc(100dvh);
    display: flex;
    flex-direction: column;
    background: var(--chat-bg);
}

@media (min-width: 1024px) {
    .chat-wrapper {
        margin-bottom: -24px;
        height: calc(100vh - 100px);
        border-radius: var(--radius);
        overflow: hidden;
    }
}

.chat-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: var(--chat-bg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
}

.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted);
}

.chat-empty-icon {
    width: 64px;
    height: 64px;
    background: var(--chat-bubble-received);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.chat-empty-icon i {
    font-size: 28px;
    color: var(--chat-muted);
}

.chat-empty p {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 4px;
    color: var(--text);
}

.chat-empty span {
    font-size: 14px;
}

.chat-date-divider {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.chat-date-divider span {
    background: var(--accent-light);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 10px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 1px;
}

.chat-message.sent {
    align-items: flex-end;
}

.chat-message.received {
    flex-direction: row;
    align-items: flex-start;
}

.chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    margin-right: 8px;
    margin-top: 2px;
    overflow: hidden;
}
.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chat-avatar-spacer {
    width: 28px;
    flex-shrink: 0;
    margin-right: 8px;
}
.chat-msg-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    max-width: calc(100% - 36px);
}

.chat-message:not(.continuation) {
    margin-top: 6px;
}

.chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 20px;
    position: relative;
}

.chat-message.sent .chat-bubble {
    background: var(--chat-bubble-sent, var(--primary));
    color: white;
    border-bottom-right-radius: 6px;
}

.chat-message.received .chat-bubble {
    background: var(--chat-bubble-received);
    color: var(--text);
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
    max-width: 100%;
}

/* When there's both image and text, connect them */
.chat-attachments + .chat-bubble {
    margin-top: 4px;
}

.chat-bubble-text {
    font-size: 16px;
    line-height: 1.35;
    word-wrap: break-word;
}

.chat-sender-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary, #1e3a8a);
    margin-bottom: 2px;
}

.chat-bubble-time {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 4px;
    display: block;
    text-align: right;
}

.chat-time-standalone,
.chat-attachment-time {
    font-size: 11px;
    color: var(--chat-time);
    margin-top: 4px;
    display: block;
    text-align: right;
}

/* Read status check marks */
.chat-bubble-time .fa-check,
.chat-bubble-time .fa-check-double,
.chat-time-standalone .fa-check,
.chat-time-standalone .fa-check-double {
    font-size: 10px;
    margin-left: 2px;
    opacity: 0.7;
}
.chat-bubble-time .chat-read,
.chat-time-standalone .chat-read {
    color: #34b7f1;
    opacity: 1;
}

.chat-input-bar {
    padding: 8px 12px 24px 12px;
    background: var(--chat-bg);
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
}

.chat-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-attach-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--chat-time);
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: color 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-attach-btn:hover {
    color: var(--primary);
}

.chat-input-wrapper {
    flex: 1;
    background: var(--chat-bubble-received);
    border-radius: 18px;
    padding: 8px 16px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    min-height: 20px;
}

.chat-input-wrapper textarea {
    width: 100%;
    border: none;
    background: none;
    resize: none;
    font-size: 16px;
    line-height: 1.4;
    max-height: 100px;
    outline: none;
    font-family: inherit;
    color: var(--text);
}

.chat-input-wrapper textarea::placeholder {
    color: var(--chat-time);
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    opacity: 0.4;
    transform: none;
}
}

/* Chat attachments */
.chat-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.chat-image-link {
    display: block;
    line-height: 0;
}

.chat-image {
    max-width: 240px;
    max-height: 240px;
    border-radius: 16px;
    object-fit: cover;
}

.chat-file-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--accent-light);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
}

.chat-file-link:hover {
    background: var(--stroke);
}

/* Chat Image Lightbox */
.chat-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    overflow: hidden;
}
.chat-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.chat-lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transform-origin: 0 0;
    will-change: transform;
    transition: none;
}
.chat-lightbox-close {
    position: absolute;
    top: max(env(safe-area-inset-top, 12px), 12px);
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}
.chat-lightbox-close:active {
    background: rgba(255,255,255,0.3);
}

.attachment-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.pending-attachment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    font-size: 12px;
}

.pending-attachment img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.remove-attachment-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: var(--error-bg-strong);
    color: var(--error);
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   LOGIN REQUIRED PAGE
   ============================================ */
.login-box {
    max-width: 360px;
    margin: 24px auto;
    text-align: center;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.login-icon i {
    font-size: 32px;
    color: var(--primary);
}

.login-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 6px;
}

.login-desc {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 20px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.15s;
    background: var(--card);
    color: var(--text);
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Flatpickr - match app styling */
.flatpickr-calendar {
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12) !important;
    border: none !important;
    font-family: inherit !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

.flatpickr-day:hover {
    background: var(--accent-light) !important;
    border-color: var(--accent-light) !important;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
span.flatpickr-weekday {
    color: var(--text) !important;
}

.flatpickr-current-month input.cur-year {
    color: var(--text) !important;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-login:hover {
    opacity: 0.9;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--stroke);
}

.btn-magic-link {
    width: 100%;
    padding: 14px;
    background: var(--accent-light);
    color: var(--primary);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-magic-link:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

/* ============================================
   CHECKIN PAGE
   ============================================ */
.checkin-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.checkin-step {
    width: 40px;
    height: 4px;
    background: var(--stroke);
    border-radius: 2px;
    transition: background 0.3s;
}

.checkin-step.active {
    background: var(--primary);
}

.checkin-step.completed {
    background: var(--success-dark);
}

.checkin-form {
    max-width: 500px;
    margin: 0 auto;
}

.checkin-section {
    margin-bottom: 32px;
}

.checkin-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 16px;
}

.guest-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.guest-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.guest-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.btn-remove-guest {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--error-bg-strong);
    color: var(--error);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.btn-add-guest {
    width: 100%;
    padding: 12px;
    background: var(--accent-light);
    color: var(--primary);
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-add-guest:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

.checkin-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn-back {
    padding: 14px 24px;
    background: var(--accent-light);
    color: var(--text);
    border: 1px solid var(--stroke);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.btn-next, .btn-submit {
    flex: 1;
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-next:hover, .btn-submit:hover {
    opacity: 0.9;
}

/* Hide bottom nav on chat page */
body.chat-page-active .bottom-nav {
    display: none !important;
}

/* Remove body padding for bottom nav on chat page */
body.chat-page-active {
    padding-bottom: 0 !important;
    background: var(--chat-bg) !important;
}

/* Chat wrapper: fit within viewport (account for topbar offset) */
body.chat-page-active .chat-wrapper {
    height: calc(100dvh - 72px);
}

html.native-app body.chat-page-active .chat-wrapper {
    height: calc(100dvh - 72px - env(safe-area-inset-top, 0));
}
/* ============================================
   LOGIN - Additional styles
   ============================================ */
.login-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-label i {
    color: var(--muted);
    width: 16px;
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ============================================
   YOUR BILL - Charges & Summary
   ============================================ */
.bill-intro {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 16px;
}

.bill-intro p {
    margin: 0;
}

.bill-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.bill-filters-inner {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    background: var(--accent-light, rgba(0, 0, 0, 0.06));
    border-radius: 28px;
}

.bill-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border: none;
    border-radius: 22px;
    background: transparent;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.bill-filter-pill:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.bill-filter-pill.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.bill-timeline {
    margin-bottom: 16px;
}

.bill-day {
    margin-bottom: 2px;
}

.bill-day-header {
    padding: 10px 0 4px;
}

.bill-day-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bill-day-items {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 4px 16px;
}

.bill-list {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 8px 20px;
    margin-bottom: 16px;
}

.bill-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--stroke);
}

.bill-item:last-child {
    border-bottom: none;
}

.bill-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--accent-light);
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.bill-item-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    margin-top: 2px;
}

.bill-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content img.bill-item-img img,
.content .bill-item-img img {
    margin: 0;
    border-radius: 0;
    max-width: none;
}

.bill-item--paid .bill-item-icon {
    opacity: 0.5;
}

.bill-item--paid .bill-item-name,
.bill-item--paid .bill-item-detail {
    color: var(--muted);
}

.bill-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.bill-item-name {
    font-size: 14px;
    color: var(--text);
}

.bill-item-detail {
    font-size: 12px;
    color: var(--muted);
}

.bill-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
    flex-shrink: 0;
}

.bill-item-amount {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.bill-item--paid .bill-item-amount {
    color: var(--muted);
}

.bill-item-status {
    font-size: 11px;
    color: var(--success-darker);
    white-space: nowrap;
}

.bill-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
}

.bill-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.bill-summary {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.bill-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
    color: var(--text);
}

.bill-paid-amount {
    color: var(--success-darker);
}

.bill-summary-final {
    padding-top: 12px;
    margin-top: 6px;
    border-top: 1px solid var(--stroke);
    font-weight: 600;
}

.bill-settled {
    color: var(--success-darker);
}

.bill-settled i {
    font-size: 13px;
}

.help-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.help-link:hover {
    text-decoration: underline;
}

/* Dark mode fixes for bill page */
@media (prefers-color-scheme: dark) {
    .bill-filter-pill.active {
        color: #0f172a;
    }

    .bill-filter-pill:hover:not(.active) {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ============================================
   PRODUCTS - Grid & Tiles
   ============================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
}

.product-tile {
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s;
}

.product-tile:active {
    transform: scale(0.98);
}

.product-tile.is-added {
    opacity: 0.6;
    cursor: default;
}

.product-tile.is-added:active {
    transform: none;
}

.product-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto 10px;
}

.product-image {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
}

.product-image-placeholder i {
    font-size: 32px;
    color: var(--muted);
    opacity: 0.5;
}

.product-added-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid var(--card);
    background: var(--success);
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.product-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.product-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.product-status {
    font-size: 12px;
    font-weight: 500;
    color: var(--success);
}

.product-grid-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-grid-divider::before,
.product-grid-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--stroke);
}

.invoice-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
    padding: 14px;
    background: var(--accent-light);
    color: var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.invoice-link .fa-chevron-right {
    margin-left: auto;
    opacity: 0.5;
}

/* Product Bottom Sheet */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-radius: 20px 20px 0 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

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

.sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--stroke);
    border-radius: 2px;
    margin: 12px auto;
    cursor: pointer;
}

.sheet-content {
    padding: 0 24px 24px;
}

.sheet-image {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--accent-light);
    margin-bottom: 16px;
}

.sheet-info {
    margin-bottom: 20px;
}

.sheet-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
}

.sheet-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.sheet-description {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.sheet-quantity {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 12px;
    background: var(--accent-light);
    border-radius: 12px;
}

.sheet-quantity.show {
    display: flex;
}

.qty-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--card);
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.1s, opacity 0.1s;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-value {
    font-size: 20px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.sheet-add-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.sheet-add-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sheet-add-btn:active:not(:disabled) {
    opacity: 0.9;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .product-sheet {
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        max-width: 480px;
        border-radius: 20px 20px 0 0;
    }
    .product-sheet.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* Welcome name sheet (booking page) */
.welcome-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-radius: 20px 20px 0 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease, bottom 0.25s ease;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.welcome-sheet.active {
    transform: translateY(0);
}
body.keyboard-open .welcome-sheet {
    padding-bottom: 0;
}
.welcome-sheet-header {
    text-align: center;
    margin-bottom: 20px;
}
.welcome-sheet-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}
.welcome-sheet-desc {
    font-size: 15px;
    color: var(--muted);
    margin: 4px 0 0;
}
.welcome-name-input {
    text-align: center;
    font-size: 18px;
    margin-bottom: 16px;
}
.welcome-skip-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.welcome-skip-btn:hover {
    color: var(--text);
}
@media (min-width: 768px) {
    .welcome-sheet {
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        max-width: 420px;
        border-radius: 20px 20px 0 0;
    }
    .welcome-sheet.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* Dark mode fixes for products */
@media (prefers-color-scheme: dark) {
    .product-image {
        box-shadow: 0 3px 12px rgba(0,0,0,0.4);
    }

    .product-card:hover {
        border-color: rgba(255,255,255,.12);
        box-shadow: 0 4px 12px rgba(0,0,0,.25);
    }

    .qty-btn {
        box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    }
}

/* ============================================================================
   Language Selector
   ============================================================================ */

.pill-btn-lang {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    min-width: auto;
    padding: 8px 10px;
}

.lang-dropdown {
    position: fixed;
    z-index: 10000;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    padding: 4px;
    min-width: 180px;
    max-height: 320px;
    overflow-y: auto;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    color: var(--text);
    transition: background 0.15s;
}

.lang-option:hover {
    background: var(--hover);
}

.lang-option.active {
    background: var(--accent-light);
    font-weight: 600;
}

.lang-option-code {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    min-width: 24px;
    text-align: center;
}

.lang-option-name {
    flex: 1;
}

.lang-option .fa-check {
    margin-left: auto;
    color: var(--primary);
    font-size: 12px;
}

@media (prefers-color-scheme: dark) {
    .lang-dropdown {
        background: var(--card);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }
}