/* =========================
   index.css — EXACT mockup look (topbar + hero + pill search)
   ✅ UPPDATERAD: mobil-anpassad skärm + ingen iOS-zoom vid input
   ========================= */

:root{
  --blue: #1f6fe5;
  --blue-hover: #1a5fd0;

  --text: #0f172a;
  --muted: #64748b;

  --border: #e5e7eb;
  --shadow-nav: 0 1px 0 rgba(15, 23, 42, 0.06);
  --shadow-pill: 0 14px 28px rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.10);

  /* ✅ Kontrollerad bildhöjd i bilkort */
  --card-img-h: 220px;

  /* ✅ Mobil-safe padding */
  --page-pad: 18px;
}

/* ✅ VIKTIGT: box-sizing */
*,
*::before,
*::after{ box-sizing: border-box; }

/* ✅ FIX: ingen “desktop-bredd” på mobil + stoppa sidled */
html, body{
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ✅ iOS: undvik zoom på inputs (kräver >=16px) */
input, select, textarea, button{
  font-size: 16px;
}

/* base */
body.page-index{
  width: 100%;
  max-width: 100% !important;   /* ✅ tar över ev. max-width från base.css */
  margin: 0 !important;         /* ✅ tar över ev. margin:auto */
  padding: 0 !important;

  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  color: var(--text);
  background: #f8fafc;

  overscroll-behavior-x: none;
  touch-action: pan-y;
}

/* ✅ Om någon wrapper i HTML sätter bredd: tvinga fullbredd */
.page-index main,
.page-index .container,
.page-index .wrapper,
.page-index #app,
.page-index .app,
.page-index .page{
  width: 100% !important;
  max-width: 100% !important;
}

/* ✅ gör att stora element aldrig kan bli bredare än skärmen */
img, svg, video, canvas, iframe{
  max-width: 100%;
  height: auto;
}

/* =========================
   TOPBAR
   ========================= */
.mx-nav{
  width: 100%;
  background: #fff;
  box-shadow: var(--shadow-nav);

  padding: 22px var(--page-pad);
  min-height: 74px;

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

.mx-brand{
  font-weight: 800;
  font-size: 22px;
  color: var(--blue);
  letter-spacing: -0.02em;
}
.mx-brand span{ color: var(--text); }

.mx-actions{
  display:flex;
  align-items:center;
  gap: 18px;
  flex-wrap: wrap;
}

.mx-link{
  text-decoration:none;
  font-weight: 600;
  color: #475569;
}
.mx-link:hover{ color: var(--blue); }
.mx-link-strong{ color: var(--blue); }

/* =========================
   HERO
   ========================= */
.mx-hero{
  width: 100%;
  text-align:center;
  padding: 72px var(--page-pad) 26px;

  background:
    radial-gradient(1200px 520px at 20% 40%, rgba(46, 141, 255, .35), transparent 60%),
    radial-gradient(1200px 520px at 82% 48%, rgba(180, 140, 255, .25), transparent 60%),
    linear-gradient(90deg, #eaf3ff, #eef2ff);
}

.mx-hero h1{
  margin: 0 0 10px;
  font-size: clamp(30px, 7vw, 54px); /* ✅ bättre på mobil */
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mx-hero p{
  margin: 0 auto 18px;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.55;
  color: #475569;
  padding: 0 2px;
}

/* =========================
   PILL SEARCH
   ========================= */
.mx-search{
  width: 100%;
  max-width: 720px;
  margin: 0 auto 14px;

  display:flex;
  align-items:center;
  background:#fff;

  border: 1px solid #dbe3ef;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow-pill);

  padding: 6px;
  gap: 6px;
}

.mx-field{
  position: relative;
  display:flex;
  align-items:center;
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border-radius: 14px;
  background: #fff;
}

.mx-field input{
  width: 100%;
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 14px 0 42px;

  /* ✅ behåll 16px så iOS inte zoomar */
  font-size: 16px;
  color: var(--text);
}

.mx-field input::placeholder{ color: #64748b; }

/* location icon */
.mx-field-location::before{
  content: "📍";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: .9;
}

/* divider between fields */
.mx-divider{
  width: 1px;
  height: 30px;
  background: #e5e7eb;
}

/* date icon + placeholder text */
.mx-field-date::before{
  content: "📅";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: .9;
}

.mx-field-date input{
  padding-left: 42px;
  padding-right: 14px;
}

/* “Datum” overlay when empty */
.mx-date-placeholder{
  position:absolute;
  left: 42px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px; /* ✅ också 16px */
  color: #64748b;
  pointer-events:none;
}
.mx-field-date.has-value .mx-date-placeholder{ display:none; }

/* Make date picker icon not ruin layout */
.mx-field-date input[type="date"]::-webkit-calendar-picker-indicator{
  opacity: 0;
  position: absolute;
  right: 10px;
}

/* Search button right (blue) */
.mx-search-btn{
  height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;

  background: var(--blue);
  color: #fff;
  font-weight: 800;
  letter-spacing: .1px;

  transition: 160ms ease;
}
.mx-search-btn:hover{ background: var(--blue-hover); }

/* =========================
   MAP BUTTON
   ========================= */
.mx-map-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;

  margin: 8px auto 6px;
  padding: 12px 20px;

  border-radius: 999px;
  border: 1px solid #dbe3ef;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-soft);

  cursor: pointer;
  font-weight: 800;
  color: var(--blue);

  transition: 160ms ease;
}
.mx-map-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15,23,42,.14);
  border-color: rgba(31,111,229,.35);
}

.mx-map-ico{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(31,111,229,.10);
}

.mx-hint{
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
  padding: 0 var(--page-pad);
}

/* =========================
   MAP: centrerad + mobil-fullbredd
   ========================= */
.search-map-panel{
  margin-top: 12px;
  width: 100%;
  padding: 0 var(--page-pad);

  display:flex;
  flex-direction: column;
  align-items:center;
}

.search-map-wrap{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  border-radius: 16px;
  overflow:hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}

.search-map,
.search-map-wrap iframe,
.search-map-wrap > iframe,
.search-map-panel iframe,
#map,
#map iframe{
  display:block;
  width: 100% !important;
  margin: 0 auto !important;
}

.search-map,
#map{ height: 420px; }

/* coords row */
.picked-coords{
  margin-top: 10px;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  width: 100%;
}

.coords-text{ font-weight: 800; }

.clear-pick-btn{
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 48px;
}

/* search results */
#searchResults{
  width: 100%;
  margin-top: 18px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--page-pad);
  text-align:left;
}

/* =========================================================
   BILKORT
   ========================================================= */
.result-card{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
  margin: 14px 0;
}

.result-media{
  width: 100%;
  height: var(--card-img-h);
  overflow: hidden;
  background: #fff;
}

.result-media.carousel{ position: relative; overflow: hidden; }

.result-media .carousel-track,
.result-media .images,
.result-media .slides{
  display:flex;
  width:100%;
  height:100%;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.result-media .carousel-track::-webkit-scrollbar,
.result-media .images::-webkit-scrollbar,
.result-media .slides::-webkit-scrollbar{ display:none; }

.result-media .slide,
.result-media .carousel-item,
.result-media .images > img,
.result-media .slides > img{
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align:center;
}

.result-media > img,
.result-media img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: cover;
}

.result-media .prev,
.result-media .next,
.result-media .carousel-prev,
.result-media .carousel-next{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  z-index: 5;
  width:40px;
  height:40px;
  border-radius:999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 22px rgba(15,23,42,.10);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.result-media .prev,
.result-media .carousel-prev{ left: 10px; }
.result-media .next,
.result-media .carousel-next{ right: 10px; }

.result-body{ padding: 14px 14px 16px; }

.result-body h3{
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 18px;
}

.result-body p{
  margin: 6px 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.price-list{
  margin: 6px 0 0;
  padding-left: 18px;
  color: #475569;
  font-size: 13px;
}

.boka-btn,
.boka-knapp{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  background: var(--blue);
  color: #fff;
}
.boka-btn:hover,
.boka-knapp:hover{ background: var(--blue-hover); }

/* =========================================================
   FEATURES
   ========================================================= */
.features{
  width: 100%;
  margin: 22px auto 0;
  max-width: 1200px;
  padding: 16px var(--page-pad) 28px;

  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;

  background: transparent;
  text-align:left;

  border-top: 1px solid rgba(15,23,42,.10);
}

.feature-box{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;

  padding: 8px 18px;
  width: auto;
  text-align:left;
}

.feature-box:not(:first-child){
  border-left: 1px solid rgba(15,23,42,.10);
}

.feature-box h3{
  font-weight: 900;
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: .2px;
}

.feature-box p{
  margin: 0;
  color: #64748b;
  line-height: 1.55;
  font-size: 13px;
}

/* =========================
   MOBILE TUNING
   ========================= */
@media (max-width: 900px){
  .features{
    grid-template-columns: 1fr;
    padding-top: 10px;
  }
  .feature-box{
    padding: 14px 6px;
  }
  .feature-box:not(:first-child){
    border-left: 0;
    border-top: 1px solid rgba(15,23,42,.10);
  }
}

@media (max-width: 720px){
  :root{
    --card-img-h: 180px;
    --page-pad: 12px; /* ✅ mer mobilvänligt */
  }

  /* topbar */
  .mx-nav{
    padding: 18px var(--page-pad) !important;
    min-height: 66px !important;
  }

  .mx-actions{
    margin-left: auto !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  .mx-brand{ font-size: 20px !important; }

  /* pill search: stapla */
  .mx-search{
    width: 100%;
    max-width: 720px;
    border-radius: 18px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
  }

  .mx-divider{ display:none; }
  .mx-search-btn{ width: 100%; }

  /* map height mobile */
  .search-map,
  #map{ height: 360px; }

  /* results padding mobile */
  #searchResults{ padding: 0 var(--page-pad); }
}

/* Dölj "Powered by Google" i Autocomplete-listan */
.pac-container:after { display: none !important; }
