/* Varaus: kompakti, houkutteleva, useita kerroksia, modalit */
body.reserve-page {
  margin: 0;
  overflow-x: hidden;
}
.reserve-shell {
  max-width: 1120px;
  margin: 0 auto 48px;
  padding: 0 16px;
  min-width: 0;
  box-sizing: border-box;
}
.reserve-hero {
  border-radius: var(--t-rad, 20px);
  overflow: hidden;
  margin-bottom: 20px;
  min-height: 200px;
  position: relative;
  background: linear-gradient(140deg, rgba(79, 70, 229, 0.35), rgba(6, 182, 212, 0.18));
  border: 1px solid var(--t-border, #1e293b);
}
.reserve-hero--cover {
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(160deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.78)),
    var(--hero-cover);
  min-height: 260px;
}
.reserve-hero__inner {
  position: relative;
  z-index: 1;
  padding: 32px 28px;
  max-width: 640px;
}
.reserve-hero__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 8px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.reserve-hero__lead {
  margin: 0;
  opacity: 0.9;
  line-height: 1.45;
  font-size: 1.02rem;
}
.reserve-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.reserve-gallery__item {
  display: block;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  border: 1px solid var(--t-border, #1e293b);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.25);
}
.reserve-gallery__item:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
}
.reserve-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, min(480px, 46vw));
  gap: 24px;
  align-items: start;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 700px) {
  .reserve-layout {
    grid-template-columns: 1fr;
  }
}
/* Grid/flex: salli kutistuminen pienempään kuin kartan "sisältö" (iso width px) */
.reserve-side,
.reserve-form-wrap,
.reserve-block,
#floorPanels {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
#floorPanels {
  overflow: hidden;
}
.reserve-block {
  background: var(--t-card, rgba(15, 23, 42, 0.92));
  border: 1px solid var(--t-border, #1e293b);
  border-radius: var(--t-rad, 16px);
  padding: 18px 20px 22px;
  margin-bottom: 16px;
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.35);
}
.reserve-block h2,
.reserve-form-title {
  font-size: 1.05rem;
  margin: 0 0 10px;
  font-weight: 700;
}
.form-grid--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.form-span-2 {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .form-grid--compact {
    grid-template-columns: 1fr;
  }
}
.reserve-compact label {
  margin-top: 0;
  font-size: 0.8rem;
}
.reserve-compact input,
.reserve-compact textarea,
.reserve-compact select {
  padding: 8px 10px;
  font-size: 0.9rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.product-tile {
  border: 1px solid var(--t-border, #1e293b);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  background: rgba(2, 6, 23, 0.4);
  transition: border-color 0.2s;
}
.product-tile:hover {
  border-color: rgba(129, 140, 248, 0.45);
}
.product-tile__img {
  height: 100px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  margin-bottom: 8px;
}
.product-tile__h {
  margin: 0 0 4px;
  font-size: 0.9rem;
}
.product-tile__p {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--t-muted, #94a3b8);
}
.floor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
/* Vanha: map-scroll. Varaussivu käyttää floorplan-outer--reserve + JS-skaalausta. */
.map-scroll {
  max-height: 360px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--t-border, #1e293b);
}
/* Nostaa tarkoituksella premiumin .floorplan-outer yli: ei erillistä skrollialuetta, skaalaus JS. */
.reserve-page .floorplan-outer.floorplan-outer--reserve {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: none;
  height: auto;
  box-sizing: border-box;
  margin: 0;
  border-radius: 10px;
  border: 1px solid var(--t-border, #1e293b);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.45), rgba(15, 23, 42, 0.65));
  padding: 0;
  overflow: hidden;
  contain: layout;
}
.reserve-page .floorplan-outer--reserve .floorplan-scale-clip {
  display: block;
  line-height: 0;
  font-size: 0;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.reserve-page .floorplan-outer--reserve .floorplan--readonly,
.reserve-page .floorplan-outer--reserve .floorplan {
  box-sizing: border-box;
}
.map-modal__scroll,
.map-modal__canvas {
  min-height: 0;
  width: 100%;
}
.map-modal__canvas {
  max-height: none;
  overflow: visible;
}
.no-mt {
  margin: 0;
}
.reserve-page .floorplan--readonly .floor-table.floor-table--pickable {
  pointer-events: auto !important;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.1s;
  z-index: 4;
}
.reserve-page .floorplan--readonly .floor-table.floor-table--pickable:hover {
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.55);
  transform: scale(1.04);
  z-index: 8;
}
.reserve-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.reserve-modal--open {
  display: flex;
}
.reserve-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(3px);
}
.reserve-modal--wide .reserve-modal__box {
  max-width: 960px;
  max-height: 90vh;
  overflow: auto;
  min-width: 0;
  width: min(100%, 960px);
  box-sizing: border-box;
}
.reserve-modal__box {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--t-card, #0f172a);
  border: 1px solid var(--t-border, #1e293b);
  border-radius: 16px;
  padding: 20px 22px 24px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
  color: var(--t-text, #e2e8f0);
}
.reserve-modal__close {
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 1.4rem;
  line-height: 1;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.reserve-modal__close:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}
.prod-opt {
  display: block;
  margin: 4px 0;
  text-align: left;
  font-size: 0.9rem;
}
.prod-modal-opts {
  max-height: 200px;
  overflow: auto;
  margin: 4px 0 10px;
  padding: 6px 0;
}
.product-price-line {
  font-size: 0.95rem;
}
.no-mt {
  margin: 0;
}
.embed-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  opacity: 0.8;
  border: 1px solid var(--t-border, #1e293b);
}
.reserve-banner {
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.hidden {
  display: none;
}
.form-actions--reserve {
  margin-top: 12px;
}
.reserve-form-wrap .reserve-block {
  position: sticky;
  top: 10px;
}
.ck-inline {
  display: block;
  margin: 6px 0 2px;
  font-size: 0.9rem;
}
.small {
  font-size: 0.9rem;
}

/* ——— Upotettu varaus (iframe, ?embed=1) ——— */
/* Ei min-height:100%: venyttää scrollHeight:ta kun parent-vaihe antaa ison iframen → kasvuristi */
html.tos-html-embed,
html.tos-html-embed body.reserve-page--embed {
  height: auto;
  min-height: 0;
  overflow-x: hidden;
}
body.reserve-page--embed {
  background: linear-gradient(165deg, #0a0f1a 0%, #0f172a 40%, #020617 100%);
  margin: 0;
  padding: 0;
}
.reserve-shell--embed {
  max-width: min(100%, 960px);
  margin: 0 auto;
  padding: 8px 10px 14px;
  box-sizing: border-box;
  min-width: 0;
}
.embed-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  min-width: 0;
  width: 100%;
}
@media (min-width: 640px) {
  .embed-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 12px 18px;
  }
}
.embed-col--map,
.embed-col--form {
  min-width: 0;
}
.embed-notice {
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0 0 6px;
  font-size: 0.8rem;
}
.embed-panel--map {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.88));
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 14px;
  padding: 10px 12px 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  min-width: 0;
}
.embed-panel__kicker {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.embed-panel__lead {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 600;
  margin: 0 0 6px;
}
.embed-panel__hint {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  margin: 0 0 8px;
}
body.reserve-page--embed .floor-tabs {
  margin-bottom: 6px;
  gap: 4px;
}
body.reserve-page--embed #floorPanels {
  overflow: hidden;
}
.embed-map-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.embed-table-hint {
  font-size: 0.75rem;
  color: #94a3b8;
}
.embed-table-hint.status-ok {
  color: #4ade80;
  font-weight: 600;
}
.embed-form {
  display: block;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(3, 7, 18, 0.98) 100%);
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 16px;
  padding: 14px 14px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-width: 0;
}
.embed-form__head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}
.embed-form__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}
.embed-form__subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}
.embed-form__msg {
  margin: 0 0 8px;
  font-size: 0.82rem;
  border-radius: 8px;
  padding: 6px 8px;
}
.embed-form__section {
  margin-bottom: 12px;
}
.embed-form__section-title {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 600;
  margin: 0 0 5px;
}
.embed-form__row--split {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.embed-form__row--split .embed-field {
  flex: 1;
  min-width: 0;
}
.embed-form__row--split .embed-field--narrow {
  flex: 0 0 72px;
  max-width: 88px;
}
.embed-form__row--split .embed-field--pc {
  flex: 0 0 80px;
  max-width: 100px;
}
.embed-field {
  margin-bottom: 0;
}
.embed-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0 0 3px;
}
.embed-field input,
.embed-field select,
.embed-field textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(2, 6, 23, 0.65);
  color: #f1f5f9;
  padding: 6px 9px;
  font-size: 0.86rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.embed-field input:focus,
.embed-field select:focus,
.embed-field textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.18);
}
.embed-field textarea {
  resize: vertical;
  min-height: 48px;
}
.embed-form__field-hint {
  font-size: 0.7rem;
  color: #64748b;
  margin: 0 0 8px;
  line-height: 1.35;
}
.embed-form__legal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 8px;
}
.embed-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #e2e8f0;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.45);
  background: rgba(2, 6, 23, 0.4);
  transition: border-color 0.15s, background 0.15s;
}
.embed-check:hover {
  border-color: rgba(100, 116, 139, 0.55);
  background: rgba(15, 23, 42, 0.45);
}
.embed-check input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: #22d3ee;
}
.embed-form__captcha {
  margin: 4px 0 2px;
  transform: scale(0.9);
  transform-origin: 0 0;
}
@media (max-width: 380px) {
  .embed-form__captcha {
    transform: scale(0.8);
  }
}
.embed-form__submit {
  margin-top: 4px;
}
.embed-form__btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #0ea5e9);
  color: #f8fafc;
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.25);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.embed-form__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.32);
}
.embed-form__btn:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
}
