/* ─── PIZZAKARTAN V6: STRÖMLINJEFORMAD OCH REN CSS ─── */

:root {
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --primary-light: #fff7ed;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-600: #475569;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;

  /* Leverans- och markörfärger */
  --color-wolt: #04aff9;
  --color-foodora: #ff1a7d;
  --color-uber: #00e56f;
  --color-own: #9f03ad;
  --color-no-delivery: #767676;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Grund: Matchar V1 exakt */
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--slate-100);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--slate-900);
  overflow: hidden;
}

.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* ─── 1. KARTAN ─── */
.map-container {
  position: absolute;
  top: 54px;
  left: 420px;
  right: 0;
  bottom: 0;
  z-index: 1;
  transition: left 0.25s ease;
}

#map {
  width: 100%;
  height: 100%;
}

.app-container.is-fullmap .map-container,
.app-container.mode-full .map-container {
  left: 0 !important;
}

.app-container.is-fullmap .content-panel,
.app-container.mode-full .content-panel {
  display: none !important;
}

/* Läge: INGEN KARTA PÅ DESKTOP (Innehållspanelen centreras och fyller utrymmet snyggt) */
.app-container.mode-none .map-container {
  display: none !important;
}

.app-container.mode-none .content-panel {
  width: 100% !important;
  max-width: 680px;
  left: 50% !important;
  transform: translateX(-50%);
  border-left: 1px solid var(--slate-200);
  border-right: 1px solid var(--slate-200);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.08);
}

/* ─── 2. FAST ORANGE TOPPFÄLT (App Header) ─── */
.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.85rem;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 1. Desktop & Tablet Landscape: Gammal toggle-knapp (Full karta / Hitta Pizza) */
.header-toggle-btn {
  background: rgba(255, 255, 255, 0.95);
  color: var(--slate-900);
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
}

.header-toggle-btn:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.header-toggle-btn.active {
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.header-toggle-btn.active:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-1px);
}

/* 2. 3-punktsval: Karta (Ingen, Mini, Full) - Dold som standard på desktop & tablet landscape */
.map-mode-selector {
  display: none !important;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.22);
  padding: 3px 4px 3px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.map-mode-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mode-pill-track {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
  padding: 2px;
  gap: 2px;
}

.mode-pill-opt {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1.25;
}

.mode-pill-opt:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.mode-pill-opt.active {
  background: #ffffff;
  color: #ea580c;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.ai-help-btn {
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-help-btn:hover {
  background: var(--slate-900);
  transform: translateY(-1px);
}

/* ─── 3. INNEHÅLLSPANEL (Desktop: Sidomeny / Mobil: Svävande panel) ─── */
.content-panel {
  position: absolute;
  top: 54px;
  left: 0;
  bottom: 0;
  width: 420px;
  background: white;
  z-index: 500;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

/* Snabbflikar */
.quick-nav-bar {
  display: flex;
  background: var(--slate-100);
  border-bottom: 1px solid var(--slate-200);
  padding: 0.4rem;
  gap: 0.3rem;
}

.nav-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-600);
  border-radius: 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.nav-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.nav-badge {
  background: var(--slate-200);
  color: var(--slate-800);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
}

.nav-tab.active .nav-badge {
  background: var(--primary-light);
  color: var(--primary);
}

/* Rullbart innehåll */
.panel-scroll-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1rem 3rem 1rem;
  scroll-behavior: smooth;
}

.content-section {
  display: block;
  margin-bottom: 1.25rem;
  scroll-margin-top: 0.5rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.section-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.section-card h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--slate-900);
}

/* Sektionstitel – Centrerad och tydlig banderoll */
.section-title-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border: 1.5px solid var(--slate-200);
  border-radius: 0.6rem;
  padding: 0.5rem 1rem;
  margin-bottom: 0.95rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.section-title-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.section-title-text {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-900);
}

/* V4-stil rubriker: STARTADRESS, TYP AV RESTAURANG, LÄGSTA GOOGLE-BETYG, LEVERANTÖR */
.control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--slate-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.85rem;
  margin-bottom: 0.35rem;
}

.control-label:first-child {
  margin-top: 0;
}

.label-with-marker {
  display: inline-flex;
  align-items: center;
}

.blue-origin-marker-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px white, 0 1px 4px rgba(0, 0, 0, 0.3);
  font-size: 10px;
  margin-right: 6px;
  flex-shrink: 0;
  line-height: 1;
}

.control-val {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.84rem;
  text-transform: none;
  letter-spacing: normal;
}

.field-hint {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.28rem;
  line-height: 1.4;
}

/* Leverantörsknappar – Alla på EN rad med markörfärger */
.provider-pill-row {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-top: 0.25rem;
  box-sizing: border-box;
}

.provider-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 2px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: all 0.15s ease;
  color: white;
  opacity: 0.65;
  filter: saturate(0.85);
  box-sizing: border-box;
}

.provider-btn:hover {
  opacity: 0.85;
}

.provider-btn.active {
  opacity: 1;
  font-weight: 800;
  filter: saturate(1.15);
  box-shadow: 0 0 0 2px #0f172a, 0 2px 6px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.provider-btn[data-provider="all"] {
  background: #334155;
}

.provider-btn.wolt {
  background: #04aff9;
}

.provider-btn.foodora {
  background: #ff1a7d;
}

.provider-btn.uber {
  background: #00b159;
}

.provider-btn.own {
  background: #9f03ad;
}

.provider-btn.pickup {
  background: #64748b;
}

/* Veckans tider i resultat-kort */
.card-hours-dropdown {
  margin-top: 0.35rem;
  font-size: 0.73rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  width: 100%;
}

.card-hours-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.32rem 0.55rem;
  cursor: pointer;
  color: #334155;
  font-weight: 600;
  user-select: none;
  list-style: none;
}

.card-hours-summary::-webkit-details-marker {
  display: none;
}

.card-hours-summary:hover {
  background: #f1f5f9;
}

.hours-chevron {
  font-size: 0.68rem;
  color: #0284c7;
  font-weight: 700;
}

.card-hours-content {
  padding: 0.4rem 0.55rem;
  border-top: 1px solid #e2e8f0;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-hour-row {
  display: flex;
  justify-content: space-between;
  padding: 1px 4px;
  border-radius: 3px;
  color: #475569;
  font-size: 0.71rem;
}

.card-hour-row.is-today {
  font-weight: 700;
  color: #ea580c;
  background: #fff7ed;
}

/* Formulärelement */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 0.35rem;
}

.form-select, .form-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--slate-200);
  border-radius: 0.5rem;
  font-size: 0.85rem;
  background: white;
  color: var(--slate-900);
  outline: none;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.val-badge {
  color: var(--primary);
  font-weight: 800;
}

.form-slider {
  width: 100%;
  accent-color: var(--primary);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill-btn {
  flex: 1 1 auto;
  padding: 0.4rem 0.55rem;
  border: 1.5px solid var(--slate-200);
  background: white;
  border-radius: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--slate-700);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}

.pill-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Resultatlista */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.sort-box {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.form-select-sm {
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--slate-200);
  border-radius: 0.35rem;
  font-size: 0.75rem;
}

.pizzeria-card {
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: 0.65rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pizzeria-card:hover {
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.card-pizzeria-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
}

.card-rating-badge {
  color: #d97706;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.card-rating-badge small {
  color: #94a3b8;
  font-weight: normal;
}

.card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--slate-600);
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}

.card-address-text {
  color: #475569;
}

.card-travel-badge {
  font-weight: 600;
  color: #0284c7;
  white-space: nowrap;
}

.card-travel-badge small {
  font-weight: normal;
  color: #64748b;
}

/* 3-prisers grid från V4 */
.card-prices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  background: #f8fafc;
  padding: 0.35rem;
  border-radius: 0.45rem;
  border: 1px solid #e2e8f0;
}

.card-price-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.2rem;
  background: white;
  border-radius: 0.35rem;
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: all 0.15s ease;
}

.card-price-pill.active {
  background: #fff7ed;
  border-color: #fdba74;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.1);
}

.card-price-pill-lbl {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.05rem;
}

.card-price-pill.active .card-price-pill-lbl {
  color: #ea580c;
}

.card-price-pill-val {
  font-size: 0.76rem;
  font-weight: 700;
  color: #15803d;
}

.card-price-pill.active .card-price-pill-val {
  color: #c2410c;
}

.card-price-pill .price-na {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.68rem;
  font-style: italic;
}

/* Horisontella chips för leverans, specialiteter & tider */
.card-chips-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
}

.chip-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.chip-wolt {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.chip-foodora {
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}

.chip-uber {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

.chip-own {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.chip-pickup {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.chip-feature {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.chip-hours {
  color: #475569;
  font-size: 0.7rem;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  margin-left: auto;
}

/* Action-rad längst ner på kortet */
.card-actions-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.card-action-btn {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 2px 7px;
  font-size: 0.69rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.card-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.card-secondary-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-right: auto;
}

.card-primary-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-text-link {
  font-size: 0.73rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: color 0.15s ease;
}

.card-text-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

.card-missing-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 4px;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-fulfill-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.71rem;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-map-btn {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.card-map-btn:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.pizzeria-name {
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
}

.pizzeria-rating {
  color: #d97706;
  font-size: 0.82rem;
}

.pizzeria-meta {
  font-size: 0.75rem;
  color: var(--slate-600);
  margin-top: 0.35rem;
  display: flex;
  gap: 0.6rem;
}

/* ─── 4. KARTMARKÖRER MED CENTRERAT NAMN OVANFÖR (UTAN BAKGRUND, SVART MED VIT SKUGGA) ─── */
.custom-pin-wrapper {
  background: transparent;
  border: none;
  overflow: visible !important;
  pointer-events: none !important; /* Wrapper blockerar inte klick */
}

.pin-marker-container {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  pointer-events: none !important;
}

.pin-name-label {
  position: absolute;
  top: 26px; /* Centrerat under markörens spets */
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 400;
  color: #0f172a;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  opacity: 0.78; /* Svag genomskinlighet så markörer bakom kan skönjas */
  /* Mjuk, svagare vit skugga */
  text-shadow: 
    0 0 2px rgba(255, 255, 255, 0.9),
    0 0 3.5px rgba(255, 255, 255, 0.7);
  pointer-events: none !important; /* Markörer under texten är fullt klickbara */
  text-align: center;
  line-height: 1.15;
  z-index: 1; /* Ligger under markörer */
  letter-spacing: -0.1px;
  user-select: none;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 1.5px solid white;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
  overflow: hidden;
  z-index: 10; /* Markören ligger över texten */
  pointer-events: auto !important; /* Endast nålen fångar klick */
}

.custom-pin:hover,
.custom-pin.selected {
  transform: rotate(-45deg) scale(1.35);
  z-index: 2000 !important;
}

.pin-marker-container:has(.custom-pin:hover) {
  z-index: 2500 !important;
}

.pin-marker-container:has(.custom-pin:hover) .pin-name-label {
  opacity: 1;
  color: #ea580c;
  font-weight: 600;
  transform: translateX(-50%) scale(1.08);
  text-shadow: 
    0 0 3px rgba(255, 255, 255, 1),
    0 0 5px rgba(255, 255, 255, 0.9);
}

.custom-pin-inner {
  transform: rotate(45deg);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Finjusterad centrering för pizza-emojin (kompenserar för emojins lutning och nålens asymmetri) */
.pin-pizza-icon {
  position: relative;
  left: -1.5px;
  top: 1.5px;
  display: inline-block;
  line-height: 1;
}

/* ── Markörklasser (inga inline färgkoder) ── */
/* Ingen leverans / Avhämtning */
.pin-none {
  background: var(--color-no-delivery);
}

/* Enskilda leverantörer */
.pin-wolt {
  background: var(--color-wolt);
}

.pin-foodora {
  background: var(--color-foodora);
}

.pin-uber {
  background: var(--color-uber);
}

.pin-own {
  background: var(--color-own);
}

/* ── Multipla leverantörer: Svart markör med 2–4 färgpunkter i mitten ── */
.pin-multi {
  background: #111827 !important;
}

/* Färgpunkter (ersätter pizzabiten i mitten) */
.dot {
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.dot-wolt { background: var(--color-wolt); }
.dot-foodora { background: var(--color-foodora); }
.dot-uber { background: var(--color-uber); }
.dot-own { background: var(--color-own); }

/* Fasta positioner i 2x2 rutnät */
.dots-fixed {
  display: grid;
  grid-template-columns: repeat(2, 6.5px);
  grid-template-rows: repeat(2, 6.5px);
  grid-gap: 1.5px;
  align-items: center;
  justify-content: center;
}

.dots-fixed .dot {
  width: 6.5px;
  height: 6.5px;
}

.dot-empty {
  visibility: hidden;
}

/* Origin marker with pulse - exakt som i V4 */
.origin-pin-container {
  background: transparent;
  border: none;
}

.origin-pin-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.origin-pin {
  width: 22px;
  height: 22px;
  background: #2563eb;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px white, 0 2px 8px rgba(0, 0, 0, 0.35);
  font-size: 11px;
  z-index: 2;
  cursor: grab;
}

.origin-pulse {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.35);
  animation: pulse-ring 2s infinite ease-out;
  z-index: 1;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ─── 5. FLYTANDE GÅNG/LEVERANSTID-SLIDER PÅ KARTANS BOTTEN ─── */
.map-slider-dock {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  z-index: 900;
  pointer-events: none;
  display: flex;
  box-sizing: border-box;
}

.time-slider-widget {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0.15rem 0.2rem;
  pointer-events: auto;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  box-sizing: border-box;
}

/* Vänsterkant: Minutknapp med fast bredd så 1-30 min obehindrat ryms utan att slidern hoppar */
.slider-widget-val {
  min-width: 58px;
  max-width: 68px;
  text-align: center;
  background: #ea580c;
  color: white;
  padding: 0.22rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  user-select: none;
}

/* Mitten: Slider som anpassar sig i bredd (flex: 1) */
.widget-slider {
  flex: 1;
  width: 100%;
  min-width: 60px;
  margin: 0;
  accent-color: #ea580c;
  height: 6px;
  cursor: pointer;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

/* Högerkant: Högertext och val mellan gång / leverans */
.mode-toggle-pill {
  background: transparent;
  border: 1.5px solid #f97316;
  border-radius: 9999px;
  color: #f97316;
  font-weight: 800;
  font-size: 0.76rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.95);
  padding: 0.2rem 0.55rem;
  user-select: none;
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
}

.mode-toggle-pill:hover {
  border-color: #ea580c;
  color: #ea580c;
  transform: scale(1.03);
}

.mode-toggle-pill:active {
  transform: scale(0.97);
}

/* När slidern är dockad i Filter-fliken */
#tabFilter .time-slider-widget {
  background: var(--slate-50);
  border: 1.5px solid var(--slate-200);
  border-radius: 12px;
  box-shadow: none;
  padding: 0.65rem 0.85rem;
  width: 100%;
}

#tabFilter .mode-toggle-pill {
  text-shadow: none;
  color: #f97316;
  background: transparent;
  border: 1.5px solid #f97316;
  border-radius: 9999px;
  padding: 0.22rem 0.55rem;
  box-shadow: none;
}

#tabFilter .mode-toggle-pill:hover {
  border-color: #c2410c;
  color: #c2410c;
}

/* Moderna Leaflet Popups */
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  line-height: 1.4;
}

.popup-card {
  padding: 0.65rem 0.8rem;
  min-width: 210px;
  max-width: 260px;
}

.popup-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.popup-rating {
  color: #ea580c;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.popup-meta {
  font-size: 0.74rem;
  color: var(--slate-600);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.popup-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 0.45rem;
}

.popup-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.popup-btn {
  flex: 1;
  text-align: center;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.popup-btn:hover {
  opacity: 0.88;
}

.popup-btn-wolt {
  background: var(--color-wolt);
  color: white;
}

.popup-btn-foodora {
  background: var(--color-foodora);
  color: white;
}

.popup-btn-uber {
  background: var(--color-uber);
  color: white;
}

.popup-btn-map {
  background: var(--slate-800);
  color: white;
}

.popup-btn-menu {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(234, 88, 12, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.popup-btn-menu:hover {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  opacity: 1;
}

.popup-menu-row {
  margin-bottom: 0.45rem;
}

.popup-menu-row .popup-btn-menu {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

.popup-phone-row {
  margin-bottom: 0.35rem;
}

.popup-btn-phone {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.popup-btn-phone:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.popup-secondary-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px dashed #e2e8f0;
}

.popup-text-link {
  font-size: 0.73rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.15s ease;
}

.popup-text-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

.popup-missing-badge {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.72rem;
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.popup-fulfill-badge {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.71rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.card-menu-btn {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
  border-radius: 9999px;
  padding: 2px 6px;
  font-size: 0.69rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.card-menu-btn:hover {
  background: #ea580c;
  color: white;
  border-color: #ea580c;
}

/* Leveranstaggar i resultatlistan */
.tag-wolt {
  color: var(--color-wolt);
  font-weight: 700;
}

.tag-foodora {
  color: var(--color-foodora);
  font-weight: 700;
}

.tag-uber {
  color: var(--color-uber);
  font-weight: 700;
}

.tag-own {
  color: var(--color-own);
  font-weight: 700;
}

/* ─── Legend / Teckenförklaring ─── */
.legend-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--slate-700);
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.legend-dot.pin-multi {
  background: #111827;
  display: inline-grid;
  grid-template-columns: repeat(2, 5.0px);
  grid-gap: 1.5px;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 1px;
  box-sizing: border-box;
}

.legend-mini-dot {
  width: 5.0px;
  height: 5.0px;
  border-radius: 50%;
  display: block;
}

/* ─── 7. AI OVERLAY (Fristående modal över allt) ─── */
.ai-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.ai-overlay.active {
  display: flex;
}

.ai-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
}

.ai-modal {
  position: relative;
  background: white;
  width: 92%;
  max-width: 480px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.ai-header {
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}

.ai-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.ai-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.ai-chip {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.ai-chat {
  background: var(--slate-50);
  border-radius: 0.5rem;
  padding: 0.75rem;
  min-height: 120px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-msg {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  line-height: 1.4;
}

.ai-msg.bot {
  background: white;
  border: 1px solid var(--slate-200);
  color: var(--slate-800);
}

.ai-msg.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
}

.ai-input-row {
  display: flex;
  gap: 0.4rem;
}

.ai-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--slate-200);
  border-radius: 0.5rem;
  font-size: 0.82rem;
  outline: none;
}

.ai-send-btn {
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

/* ─── 6. MOBILANPASSNING & TABLET PORTRÄTT (Konsoliderad media query) ─── */
@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  /* Layout container */
  .app-container {
    flex-direction: column !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  /* Fast toppfält */
  .app-header {
    position: relative;
    order: 1;
    flex: 0 0 54px;
    height: 54px;
    width: 100%;
    padding: 0 0.35rem;
    gap: 0.2rem;
    z-index: 1000;
  }

  .brand-title {
    font-size: 0.88rem;
    gap: 0.15rem;
    white-space: nowrap;
  }

  .brand-title small {
    display: none;
  }

  .header-actions {
    gap: 0.2rem;
    display: flex;
    align-items: center;
  }

  /* Dölj desktop toggle-knappen på mobil & tablet porträtt */
  .header-toggle-btn {
    display: none !important;
  }

  .map-mode-title {
    display: none;
  }

  /* Visa 3-punktsvalet för mobil & tablet porträtt */
  .map-mode-selector {
    display: inline-flex !important;
    padding: 2px;
    gap: 0;
  }

  .mode-pill-opt {
    padding: 2px 5px;
    font-size: 0.68rem;
  }

  .info-help-btn {
    width: 25px;
    height: 25px;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  .ai-help-btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.72rem;
    flex-shrink: 0;
  }

  .quick-nav-bar {
    padding: 0.25rem 0.25rem;
    gap: 0.15rem;
    width: 100%;
    box-sizing: border-box;
  }

  .nav-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.45rem 0.1rem;
    font-size: 0.7rem;
    gap: 0.1rem;
    white-space: nowrap;
    justify-content: center;
  }

  .nav-badge {
    font-size: 0.62rem;
    padding: 0.05rem 0.2rem;
  }

  /* Läge: MINIKARTA (175px under toppfältet så Södermalm syns snyggt) */
  .map-container {
    position: relative;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    order: 2;
    flex: 0 0 175px !important;
    height: 175px !important;
    min-height: 175px !important;
    max-height: 175px !important;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    border-bottom: 2px solid var(--slate-200);
  }

  /* Innehållspanel med flikar och lista under minikartan */
  .content-panel {
    position: relative;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    order: 3;
    flex: 1 1 0px !important;
    height: auto !important;
    box-shadow: none;
    z-index: 20;
    overflow-x: hidden;
  }

  .panel-scroll-content {
    /* Extra padding i botten så att innehållet kan rullas fritt ovanför adressfältet */
    padding: 0.6rem 0.5rem 4.5rem 0.5rem;
    overflow-x: hidden;
  }

  .section-card {
    padding: 0.75rem 0.65rem;
    margin-bottom: 0.75rem;
  }

  /* Läge: FULLSKÄRMSKARTA PÅ MOBIL ('Full') */
  .app-container.is-fullmap .map-container,
  .app-container.mode-full .map-container {
    position: absolute !important;
    top: 54px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    flex: 1 1 0px !important;
    z-index: 50;
  }

  .app-container.is-fullmap .content-panel,
  .app-container.mode-full .content-panel {
    display: none !important;
  }

  /* Läge: INGEN KARTA - Panelen fyller 100% direkt under toppfältet (noll tomrum) */
  .app-container.mode-none .map-container {
    display: none !important;
  }

  .app-container.mode-none .content-panel {
    display: flex !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    flex: 1 1 0px !important;
    transform: none !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 20 !important;
  }

  /* Slider dockning i botten på mobil */
  .map-slider-dock {
    bottom: 6px;
    padding: 0 0.5rem;
  }
}

/* ─── 8. MENY & INGREDIENSER MODAL ─── */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.menu-overlay.active {
  display: flex;
}

.menu-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.menu-modal,
.menu-modal * {
  box-sizing: border-box;
}

.menu-modal {
  position: relative;
  background: white;
  width: min(680px, calc(100% - 1.5rem));
  max-width: min(680px, calc(100% - 1.5rem));
  max-height: 88vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  z-index: 10;
  animation: menuModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes menuModalFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.menu-header {
  padding: 0.95rem 1.25rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-header-main {
  flex: 1;
  min-width: 0;
}

.menu-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.menu-modal-icon {
  font-size: 1.35rem;
}

.menu-restaurant-title {
  font-size: 1.18rem;
  font-weight: 800;
  margin: 0;
  color: white;
  word-break: break-word;
  line-height: 1.25;
}

.menu-verified-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.02em;
}

.menu-restaurant-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.menu-close-btn {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

.menu-close-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.05);
}

/* ─── Toolbar (Sök och filterchips) ─── */
.menu-toolbar {
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* ─── Bygg Egen Pizza & Ingrediensväljare (i enskilda menyer) ─── */
.menu-builder-container {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.menu-builder-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-builder-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.menu-builder-icon {
  font-size: 1.15rem;
}

.menu-builder-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-900);
}

.menu-builder-selected-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 12px;
}

.menu-builder-clear-btn {
  margin-left: auto;
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.menu-builder-clear-btn:hover {
  background: #fecaca;
  color: #b91c1c;
}

.menu-builder-desc {
  font-size: 0.78rem;
  color: var(--slate-500);
  line-height: 1.35;
}

.menu-builder-chips {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: none !important;
  overflow-y: visible !important;
  padding: 4px 0;
}

.menu-builder-chips::-webkit-scrollbar {
  width: 4px;
}
.menu-builder-chips::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.menu-builder-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 0.32rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.2;
}

.menu-builder-chip:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
}

.menu-builder-chip.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.3);
}

.menu-builder-chip.gluten-chip {
  border-color: #10b981;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}

.menu-builder-chip.gluten-chip:hover {
  background: #d1fae5;
  border-color: #059669;
}

.menu-builder-chip.gluten-chip.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.3);
}

.menu-builder-chip.gluten-chip.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #94a3b8;
}

/* Matchningskort för egenbyggd pizza */
.menu-builder-match-box {
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  animation: fadeInMatch 0.2s ease-out;
}

@keyframes fadeInMatch {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.menu-builder-match-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.menu-builder-match-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.menu-builder-match-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ea580c;
}

.menu-builder-match-breakdown {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
  background: #f8fafc;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.menu-builder-match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.1rem;
}

.match-tag {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}

.match-tag.matched {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.match-tag.added {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.match-tag.gluten {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.menu-pizza-card.is-best-match {
  border: 2px solid #0284c7 !important;
  background: #f0f9ff !important;
  position: relative;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.best-match-ribbon {
  display: inline-block;
  background: #0284c7;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 0.35rem;
  letter-spacing: 0.3px;
}

.menu-category-chips {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.menu-category-chips::-webkit-scrollbar {
  display: none;
}

.menu-chip {
  background: white;
  border: 1px solid var(--slate-200);
  color: var(--slate-600);
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.menu-chip:hover {
  border-color: #cbd5e1;
  color: var(--slate-900);
}

.menu-chip.active {
  background: #ea580c;
  color: white;
  border-color: #ea580c;
}

/* ─── Meny Body & Pizzalista ─── */
.menu-body {
  padding: 0.85rem 1.25rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #ffffff;
}

.menu-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--slate-600);
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed var(--slate-200);
}

.menu-price-note {
  font-size: 0.7rem;
  color: #16a34a;
  font-weight: 600;
}

.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
}

.menu-pizza-card {
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.menu-pizza-card:hover {
  border-color: #fdba74;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.08);
}

.menu-pizza-card.is-matched {
  border-color: #ea580c;
  background: #fffdfa;
}

.menu-pizza-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.menu-pizza-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.menu-pizza-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: #ea580c;
  white-space: nowrap;
}

.menu-pizza-cat {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.menu-pizza-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  margin-top: 0.2rem;
}

.menu-ing-tag {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
}

.menu-ing-tag.match {
  background: #fed7aa;
  color: #9a3412;
  font-weight: 700;
}

.menu-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #64748b;
  font-size: 0.88rem;
  grid-column: 1 / -1;
}

/* ─── Meny Footer ─── */
.menu-footer {
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.menu-footer-source {
  font-size: 0.72rem;
  color: #64748b;
  flex: 1;
  min-width: 200px;
}

.menu-footer-source a {
  color: #ea580c;
  text-decoration: none;
  font-weight: 600;
}

.menu-footer-actions {
  display: flex;
  gap: 0.4rem;
}

.menu-footer-btn {
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: white;
}

@media (max-width: 768px) {
  .menu-overlay {
    padding: 0.5rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
  .menu-modal {
    width: 100%;
    max-width: 100%;
    max-height: 94vh;
    border-radius: 12px;
    box-sizing: border-box;
    min-width: 0;
    overflow-x: hidden;
  }
  .menu-header,
  .menu-toolbar,
  .menu-body,
  .menu-footer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
  .menu-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    min-width: 0;
  }
  .menu-restaurant-title {
    font-size: 1.05rem;
  }
  .menu-category-chips {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .menu-items-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .menu-pizza-card {
    min-width: 0;
  }
  .menu-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .menu-footer-source {
    min-width: 0;
  }
  .menu-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    width: 100%;
  }
  .menu-footer-btn {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }
}

/* ─── FÖRLÄNGNING V6.1: INFO, PIZZABYGGARE & ORDER-SEKTION ─── */

/* 1. Header ? Knapp (intill logon i brand-title) */
.info-help-btn {
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
  margin-left: 2px;
}

.info-help-btn:hover {
  background: #ffffff;
  color: #ea580c;
  border-color: #ffffff;
  transform: scale(1.1);
}

.info-version-badge {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
  line-height: 1.2;
}

/* 2. Info Overlay (?) */
.info-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.info-overlay.active {
  display: flex;
}

.info-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.info-modal {
  position: relative;
  background: white;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  z-index: 2;
  animation: modalFadeIn 0.25s ease-out;
}

.info-header {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: white;
  padding: 0.85rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.info-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.info-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.info-body {
  padding: 1.1rem 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.info-block h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.info-step-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.8rem;
  color: #334155;
  margin-bottom: 0.45rem;
  line-height: 1.45;
}

.info-step-num {
  background: #ffedd5;
  color: #c2410c;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* 3. Bygg egen pizza & Ingredienspills */
.mode-tab-group {
  display: flex;
  gap: 0.35rem;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  margin-bottom: 0.85rem;
}

.mode-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.45rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mode-tab-btn.active {
  background: white;
  color: #ea580c;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ingredient-pills-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ingredient-group-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 0.35rem;
  margin-bottom: 0.2rem;
}

.ingredient-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ingredient-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.32rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ingredient-pill:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.ingredient-pill.active {
  background: #ffedd5;
  border-color: #ea580c;
  color: #c2410c;
  font-weight: 700;
}

.ingredient-pill.disabled {
  opacity: 0.38;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.ing-pill-count {
  font-size: 0.65rem;
  font-weight: 500;
  color: #64748b;
  margin-left: 2px;
}

.ing-pill-count.zero {
  color: #94a3b8;
  font-style: italic;
}

.sub-variant-pill.disabled {
  opacity: 0.38;
  cursor: not-allowed !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.sub-venue-count.zero {
  color: #94a3b8;
  font-style: italic;
}

/* Stil-taggar för restauranger (Kvarter vs Napolitansk vs Trattoria) */
.pizzeria-style-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 6px;
  white-space: nowrap;
}

.pizzeria-style-tag.classic {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.pizzeria-style-tag.craft {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.pizzeria-style-tag.trattoria {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.popup-style-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 5px;
  white-space: nowrap;
}

.popup-style-tag.classic { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.popup-style-tag.craft { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.popup-style-tag.trattoria { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.build-summary-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
}

.build-summary-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #9a3412;
  font-size: 0.85rem;
}

.build-match-badge {
  background: #ea580c;
  color: white;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 600;
}

.build-summary-header {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7c2d12;
  margin-top: 0.45rem;
  margin-bottom: 0.35rem;
}

.build-summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.build-summary-list li {
  font-size: 0.76rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.build-summary-list .bullet {
  color: #ea580c;
  font-weight: 900;
  font-size: 0.85rem;
}

.build-summary-list .sub-name {
  color: #0f172a;
  background: #ffedd5;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid #fed7aa;
}

.build-summary-drink {
  margin-top: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px dashed #fed7aa;
  font-size: 0.76rem;
  color: #1e293b;
}

.build-conflict-tip {
  margin-top: 0.55rem;
  padding: 0.45rem 0.65rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #991b1b;
  line-height: 1.45;
}

.build-conflict-tip strong {
  color: #7f1d1d;
}

.tray-badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

/* ─── STANDARD PIZZA LISTA (ersätter rullmeny) ─── */
.pizza-menu-list-container {
  margin-top: 0.6rem;
}

.pizza-menu-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0.6rem;
}

.pizza-search-input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.78rem;
  outline: none;
  box-sizing: border-box;
}

.pizza-search-input:focus {
  border-color: #ea580c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.15);
}

.pizza-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-bottom: 2px;
}

.pizza-cat-chip {
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  background: white;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
.pizza-cat-chip.active {
  background: #ea580c;
  border-color: #ea580c;
  color: white;
}

.pizza-cards-scroll {
  /* Ingen inre rullist - visas som en överskådlig lista som följer sidan */
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-pricing-block {
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.card-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #15803d;
}

.card-breakdown-row {
  font-size: 0.72rem;
  color: #475569;
  margin-top: 2px;
  line-height: 1.35;
}

.combo-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 3px;
}
.combo-badge.combo {
  background: #dcfce7;
  color: #166534;
}
.combo-badge.special {
  background: #ffedd5;
  color: #9a3412;
}

.combo-stat-sub {
  font-size: 0.78rem;
  font-weight: normal;
  color: #64748b;
  margin-left: 4px;
}

.pizza-menu-card {
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  text-align: left;
}

.pizza-menu-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.pizza-menu-card.active {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: 0 0 0 1px #ea580c;
}

.pizza-menu-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.pizza-menu-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.84rem;
  color: #1e293b;
}

.pizza-menu-card.active .pizza-menu-card-title {
  color: #c2410c;
}

.pizza-menu-count-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}
.pizza-menu-count-badge.zero {
  color: #94a3b8;
  background: #f1f5f9;
}

.pizza-menu-price-badge {
  font-size: 0.76rem;
  font-weight: 800;
  color: #15803d;
  white-space: nowrap;
}

.pizza-menu-card-ings {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.25;
}

.pizza-menu-match-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 0.25rem;
}

/* ─── UNDERVAL / SPECIALVAL I BYGG EGEN ─── */
.sub-variant-drawer {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sub-variant-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sub-variant-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sub-variant-pill {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: white;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.sub-variant-pill:hover {
  border-color: #ea580c;
}

.sub-variant-pill.active {
  background: #ffedd5;
  border-color: #ea580c;
  color: #c2410c;
  font-weight: 700;
}

.sub-venue-count {
  font-size: 0.64rem;
  color: #64748b;
  font-weight: normal;
}

/* ─── DRYCKESVAL ─── */
.drink-selector-box {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e2e8f0;
}

.drink-header {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drink-selected-name {
  font-weight: 700;
  color: #ea580c;
}

.drink-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.drink-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drink-pill:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.drink-pill.active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
  font-weight: 700;
}

.drink-price-sub {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: normal;
}

/* 4. Verifierat / Äkthetsgaranti box */
.verified-guarantee-box {
  display: flex;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  align-items: flex-start;
}

.guarantee-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.guarantee-text {
  font-size: 0.73rem;
  color: #166534;
  line-height: 1.45;
}

/* 5. Notice Banner i resultat */
.notice-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.notice-banner-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #92400e;
}

.notice-banner-btn {
  border: none;
  background: #d97706;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.notice-banner-btn:hover {
  background: #b45309;
}

/* 6. Webbplats- och telefonlänk på korten */
.card-web-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.69rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.card-web-btn:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0284c7;
}

.card-meta-web-link {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.card-meta-web-link:hover {
  text-decoration: underline;
  color: #0369a1;
}

.card-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.69rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.card-phone-btn:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.card-phone-na {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* 7. Order-sektion */
.order-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.85rem;
}

.order-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
}

.order-selected-pizza {
  color: #ea580c;
  font-size: 0.95rem;
}

.order-summary-sub {
  font-size: 0.73rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.quick-call-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
  gap: 8px;
}

.quick-call-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}

.quick-call-meta {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 1px;
}

.quick-call-btn {
  background: #15803d;
  color: white;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.quick-call-btn:hover {
  background: #166534;
}

/* ─── DEFINITIVA MOBILJUSTERINGAR (Garanterar korrekt företräde och noll spill) ─── */
@media (max-width: 768px), (max-width: 1024px) and (orientation: portrait) {
  .app-header {
    padding: 0 0.4rem !important;
    gap: 0.25rem !important;
  }

  .brand-title {
    font-size: 0.92rem !important;
    gap: 0.2rem !important;
    white-space: nowrap !important;
  }

  .header-actions {
    gap: 0.25rem !important;
    display: flex !important;
    align-items: center !important;
  }

  .map-mode-selector {
    display: inline-flex !important;
    padding: 2px !important;
    gap: 0 !important;
  }

  .mode-pill-opt {
    padding: 2px 6px !important;
    font-size: 0.68rem !important;
  }

  .info-help-btn {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.78rem !important;
    flex-shrink: 0 !important;
  }

  .ai-help-btn {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.72rem !important;
    flex-shrink: 0 !important;
  }

  .quick-nav-bar {
    display: flex !important;
    padding: 0.25rem 0.25rem !important;
    gap: 0.15rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .nav-tab {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 0.45rem 0.1rem !important;
    font-size: 0.7rem !important;
    gap: 0.1rem !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }

  .nav-badge {
    font-size: 0.62rem !important;
    padding: 0.05rem 0.2rem !important;
  }

  .panel-scroll-content {
    padding: 0.6rem 0.5rem 4.5rem 0.5rem !important;
    overflow-x: hidden !important;
  }

  .section-card {
    padding: 0.75rem 0.65rem !important;
    margin-bottom: 0.75rem !important;
  }
}



/* Pizza Selection Header & Collapsible Toggle Bar */
.pizza-selection-header-box {
  margin-top: 0.6rem;
  margin-bottom: 0.75rem;
}
.pizza-selection-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #1e293b;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}
.pizza-selection-disclaimer {
  font-size: 0.76rem;
  line-height: 1.4;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 3.5px solid #f59e0b;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}
.pizza-collapse-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.pizza-collapse-toggle-bar:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}
.pizza-current-choice-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pizza-choice-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.pizza-choice-texts {
  min-width: 0;
}
.pizza-choice-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pizza-choice-sub {
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pizza-collapse-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.pizza-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}
.pizza-toggle-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.pizza-clear-choice-btn {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.pizza-clear-choice-btn:hover {
  background: #fecaca;
}

/* ══════════════════════════════════════════════════════════════
   V7 STYLING: VALKNAPPAR, ACCORDIONS & MENYBYGGARE
   ══════════════════════════════════════════════════════════════ */

/* 1. Nya knappar för Pizza-val: [Se valmöjligheter] och [Val nollställda / Nollställ val] */
.pizza-action-btns-row {
  display: flex;
  gap: 8px;
  margin-top: 0.5rem;
}

.btn-pizza-opt {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pizza-opt:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-pizza-opt.is-open {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.btn-pizza-reset {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pizza-reset.active {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.btn-pizza-reset.needs-reset {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.btn-pizza-reset.needs-reset:hover {
  background: #ffedd5;
  border-color: #fb923c;
}

/* 2. Utfällbara Accordions i Pizza-avdelningen */
.options-accordion {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.options-accordion-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  background: #f8fafc;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  user-select: none;
  list-style: none;
}

.options-accordion-summary::-webkit-details-marker {
  display: none;
}

.options-accordion[open] .options-accordion-summary {
  border-bottom: 1px solid #e2e8f0;
  background: #f1f5f9;
}

.options-accordion-summary .accordion-chevron {
  transition: transform 0.2s ease;
}

.options-accordion[open] .options-accordion-summary .accordion-chevron {
  transform: rotate(180deg);
}

.options-accordion-content {
  padding: 0.75rem;
}

/* 3. Avdelningar och ikoner i enskild pizzerias meny-byggare */
.menu-builder-cat-group {
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed #e2e8f0;
}
.menu-builder-cat-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.menu-builder-cat-title {
  font-size: 0.73rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.menu-builder-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* 4. Matchnings- och differensvisning på pizzakort i enskild meny */
.menu-pizza-match-diff {
  margin-top: 0.45rem;
  padding: 0.5rem 0.65rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.74rem;
}

.match-diff-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.match-diff-row .diff-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.match-diff-row .diff-title {
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.match-diff-row .diff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.diff-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.diff-tag.has {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.diff-tag.add {
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.diff-tag.remove {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
  text-decoration: line-through;
}

.menu-match-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.menu-match-status-badge.match-perfect {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.menu-match-status-badge.match-partial {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.menu-match-status-badge.match-none {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}


/* ─── Markering och tillkommande val i enskild meny ─── */
.menu-pizza-card.has-matched-ingredients {
  border: 1.5px solid #22c55e;
  background: #f0fdf4;
}

.menu-pizza-card.has-matched-ingredients .menu-pizza-title {
  color: #15803d;
}

.menu-ing-tag.match {
  background: #dcfce7;
  color: #15803d;
  border: 1.5px solid #86efac;
  font-weight: 700;
}

.menu-ing-tag.extra-addon {
  background: #ffedd5;
  color: #9a3412;
  border: 1px dashed #fdba74;
  font-weight: 600;
}

.menu-ing-tag.extra-addon.gluten {
  background: #fef3c7;
  color: #b45309;
  border: 1px dashed #fcd34d;
}

.menu-pizza-price-calc {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.menu-pizza-price-calc .total-price {
  font-size: 0.95rem;
  color: #0f172a;
}

.menu-pizza-price-calc .base-price-sub {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 500;
}

.menu-ing-tag.deduct-addon {
  background: #f8fafc;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  text-decoration: line-through;
  font-size: 0.72rem;
  opacity: 0.85;
}
.menu-ing-tag.deduct-addon:hover {
  opacity: 1;
}

/* ─── Nedfällbar Bygg egen pizza & matcha (Collapsible Details) ─── */
.menu-builder-details {
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all 0.2s ease;
  padding: 0 !important;
}

.menu-builder-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  background: #f8fafc;
  border-radius: 11px;
  transition: background 0.15s ease;
}

.menu-builder-summary::-webkit-details-marker {
  display: none;
}

.menu-builder-summary:hover {
  background: #f1f5f9;
}

.menu-builder-details[open] .menu-builder-summary {
  border-bottom: 1px solid #e2e8f0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: #f8fafc;
}

.menu-builder-summary-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-builder-summary-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.menu-builder-chevron {
  font-size: 0.85rem;
  color: #64748b;
  transition: transform 0.2s ease;
}

.menu-builder-details[open] .menu-builder-chevron {
  transform: rotate(180deg);
}

.menu-builder-dropdown-content {
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
