/* The hotel search form: one dates field with a range calendar, and the destination hints. */
.sd { position: relative; min-width: 0; }
.sd .classic-label { color: #a3adc2; font-weight: 650; }

.sd-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(48, 86, 150, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.sd.has-error .sd-row { border-color: rgba(201, 47, 69, 0.55); }

.sd-half {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.3rem 0.7rem 0.3rem 0.5rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #10224f;
  cursor: pointer;
  font: inherit;
  text-align: start;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.sd-half.is-out { padding-inline-start: 1rem; border-start-start-radius: 0; border-end-start-radius: 0; }
.sd-half.is-out::before { content: ""; position: absolute; inset-block: 0.6rem; inset-inline-start: 50%; width: 1px; background: rgba(16, 40, 90, 0.1); }
.sd-half:hover { background: rgba(238, 243, 255, 0.7); }
.sd-half.is-on { background: #fff; box-shadow: 0 0 0 2px rgba(76, 99, 245, 0.55), 0 6px 16px rgba(48, 86, 150, 0.1); }
.sd-half:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.3); }

.sd-icon {
  flex: none;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0.36rem;
  border-radius: 9px;
  background: linear-gradient(180deg, #f7faff 0%, #e4edff 100%);
  box-shadow: inset 0 1px 0 #fff;
  color: #4c63f5;
}

.sd-icon path,
.sd-nav path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sd-copy { display: grid; gap: 0.05rem; min-width: 0; }
.sd-cap { color: #8b97b8; font-size: 0.66rem; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; }
.sd-val { overflow: hidden; color: #10224f; font-size: 0.92rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.sd-half.is-empty .sd-val { color: #a3adc2; font-weight: 600; }

.sd-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; }
.sd-nights {
  margin: 0 0.1rem 0.2rem 0;
  padding: 0.08rem 0.5rem;
  border-radius: 999px;
  background: #eaf0ff;
  color: #3f55e6;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.sd-nights[hidden] { display: none; }

/* The range calendar opens under the whole row and pushes the fields below down. */
.sd-pop {
  margin-top: 0.35rem;
  padding: 0.55rem 0.6rem 0.5rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(18, 48, 96, 0.35);
  animation: sd-open 0.18s ease;
}

.sd-pop[hidden] { display: none; }
@keyframes sd-open { from { opacity: 0; transform: translateY(-4px); } }

.sd-head { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.2rem; }
.sd-titles { display: grid; flex: 1; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 0.9rem; text-align: center; }
.sd-title { color: #10224f; font-size: 0.84rem; font-weight: 780; }

.sd-nav {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.35rem;
  border: 1px solid rgba(16, 40, 90, 0.08);
  border-radius: 50%;
  background: #fff;
  color: #10224f;
  cursor: pointer;
}

.sd-nav:disabled { cursor: default; opacity: 0.3; }
.sd-nav:not(:disabled):hover { color: #2f6bff; }
.sd-nav:focus-visible { outline: 2px solid #2f6bff; outline-offset: 2px; }
.sd-nav svg { width: 100%; height: 100%; }
[dir="rtl"] .sd-nav svg { transform: scaleX(-1); }

.sd-months { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 0.9rem; }
.sd-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 0.06rem; }
.sd-wd { padding: 0.15rem 0; color: #8b97b8; font-size: 0.6rem; font-weight: 750; text-align: center; text-transform: uppercase; }

.sd-day {
  position: relative;
  height: 1.95rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #10224f;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.sd-day::after {
  content: "";
  position: absolute;
  inset: 0.1rem;
  z-index: 0;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.sd-day:not(:disabled):not(.is-start):not(.is-end):hover::after { background: #eef3ff; }
.sd-day.is-start:hover::after,
.sd-day.is-end:not(.is-preview):hover::after { filter: brightness(1.06); }
.sd-day:disabled { color: #c3cadb; cursor: default; }
.sd-day.is-today { color: #2f6bff; font-weight: 800; }
.sd-day:focus-visible { outline: none; }
.sd-day:focus-visible::after { box-shadow: 0 0 0 2px #2f6bff; }
.sd-day.is-in { background: #edf2ff; }
.sd-day.is-in.is-preview { background: #f4f7ff; }
.sd-day.is-start,
.sd-day.is-end { color: #fff; font-weight: 800; }
.sd-day.is-start::after,
.sd-day.is-end::after { background: linear-gradient(135deg, #2f6bff, #6a4cf5); box-shadow: 0 4px 10px rgba(76, 99, 245, 0.3); }
.sd-day.is-end.is-preview { color: #2f6bff; }
.sd-day.is-end.is-preview::after { background: #e3eaff; box-shadow: none; }
.sd-day.is-start:has(+ .is-in),
.sd-day.is-start:has(+ .is-end) { background: linear-gradient(to right, transparent 50%, #edf2ff 50%); }
.sd-day.is-in + .sd-day.is-end,
.sd-day.is-start + .sd-day.is-end { background: linear-gradient(to left, transparent 50%, #edf2ff 50%); }
[dir="rtl"] .sd-day.is-start:has(+ .is-in),
[dir="rtl"] .sd-day.is-start:has(+ .is-end) { background: linear-gradient(to left, transparent 50%, #edf2ff 50%); }
[dir="rtl"] .sd-day.is-in + .sd-day.is-end,
[dir="rtl"] .sd-day.is-start + .sd-day.is-end { background: linear-gradient(to right, transparent 50%, #edf2ff 50%); }
.sd-day > * { position: relative; }
.sd-day { isolation: isolate; }
.sd-day::after { z-index: -1; }

.sd-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-top: 0.35rem; padding-top: 0.45rem; border-top: 1px solid rgba(16, 40, 90, 0.06); }
.sd-hint { margin: 0; color: #4a5b82; font-size: 0.76rem; font-weight: 650; }
.sd-actions { display: flex; gap: 0.4rem; margin-inline-start: auto; }
.sd-clear,
.sd-done { min-height: 1.85rem; padding: 0 0.8rem; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.76rem; font-weight: 750; }
.sd-clear { border: 1px solid rgba(16, 40, 90, 0.12); background: #fff; color: #4a5b82; }
.sd-clear[hidden] { display: none; }
.sd-done { border: 0; background: linear-gradient(90deg, #2f6bff, #6a4cf5); color: #fff; }
.sd-clear:focus-visible,
.sd-done:focus-visible { outline: 2px solid #2f6bff; outline-offset: 2px; }

/* Guests and rooms in the hotel form: opens in the form like the calendar, no inner scroll. */
.classic-form.is-stays .party-panel {
  position: static;
  max-height: none !important;
  margin-top: 0.35rem;
  overflow: visible;
  padding: 0.25rem 0.75rem 0.6rem;
  border: 1px solid rgba(16, 40, 90, 0.06);
  border-radius: 16px;
  box-shadow: 0 18px 40px -18px rgba(18, 48, 96, 0.35);
  animation: sd-open 0.18s ease;
}

.classic-form.is-stays .party-room { padding: 0.3rem 0 0.35rem; }
.classic-form.is-stays .party-room-title { padding: 0.3rem 0 0.1rem; color: #8b97b8; font-size: 0.66rem; letter-spacing: 0.07em; }
.classic-form.is-stays .party-row { gap: 0.75rem; padding: 0.32rem 0; }
.classic-form.is-stays .party-row + .party-row { border-top: 0; }
.classic-form.is-stays .party-row-label { font-size: 0.86rem; }
.classic-form.is-stays .party-row-hint { font-size: 0.7rem; }
.classic-form.is-stays .party-stepper { gap: 0.3rem; }
.classic-form.is-stays .party-step { width: 1.85rem; height: 1.85rem; font-size: 1rem; }
.classic-form.is-stays .party-step:not(:disabled):hover { border-color: rgba(47, 107, 255, 0.45); background: #f4f7ff; }
.classic-form.is-stays .party-value { min-width: 1.4rem; font-size: 0.9rem; }
.classic-form.is-stays .party-ages { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.4rem; padding: 0.1rem 0 0.3rem; }
.classic-form.is-stays .party-age-label { font-size: 0.68rem; }
.classic-form.is-stays .party-age-select { min-height: 2.1rem; border-radius: 10px; font-size: 0.86rem; }

/* "Remove this room" sits on the room's own title line. */
.classic-form.is-stays .party-room-title { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; width: 100%; }
.classic-form.is-stays .party-link.is-quiet {
  margin: 0;
  padding: 0;
  color: #8b97b8;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.classic-form.is-stays .party-link.is-quiet:hover { color: #c2304a; }

.classic-form.is-stays .party-link:not(.is-quiet) {
  justify-self: stretch;
  margin-top: 0.4rem;
  padding: 0.5rem;
  border: 1px dashed rgba(47, 107, 255, 0.35);
  border-radius: 12px;
  background: #f7f9ff;
  font-size: 0.8rem;
  text-align: center;
}

.classic-form.is-stays .party-link:not(.is-quiet):hover { background: #eef3ff; }

/* Destination hints. */
.place-heading {
  padding: 0.55rem 0.7rem 0.25rem;
  color: #8b97b8;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.place-heading + .place-option { margin-top: 0.05rem; }
.place-option:has(.sh-text) { justify-content: flex-start; gap: 0.65rem; padding: 0.5rem 0.6rem; }

.sh-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 11px;
  background: linear-gradient(180deg, #f7faff 0%, #e8efff 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(16, 40, 90, 0.05);
  color: #4c63f5;
}

.sh-mark svg { width: 1.1rem; height: 1.1rem; }
.sh-mark path { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sh-mark .flag-slot { width: 22px; height: 16px; overflow: hidden; border-radius: 3px; box-shadow: 0 0 0 1px rgba(16, 40, 90, 0.12); }
.sh-mark .flag-slot svg { width: 100%; height: 100%; }
.sh-mark.is-hotel { background: linear-gradient(180deg, #fff8f1 0%, #ffeedd 100%); color: #d9771a; }

.sh-text { display: grid; flex: 1; gap: 0.08rem; min-width: 0; }
.sh-title { overflow: hidden; color: #10224f; font-size: 0.93rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.sh-hit { background: none; color: #10224f; font-weight: 850; }
.sh-meta { display: flex; align-items: center; gap: 0.3rem; overflow: hidden; color: #6b7a9c; font-size: 0.76rem; white-space: nowrap; }
.sh-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.sh-meta .flag-slot { flex: none; width: 14px; height: 10px; overflow: hidden; border-radius: 2px; box-shadow: 0 0 0 1px rgba(16, 40, 90, 0.12); }
.sh-meta .flag-slot svg { width: 100%; height: 100%; }
.sh-kind { flex: none; color: #d9771a; font-weight: 700; }
.sh-kind::after { content: "·"; margin-inline-start: 0.3rem; color: #a3adc2; }
.sh-count { flex: none; padding: 0.2rem 0.5rem; border-radius: 999px; background: #f1f5fd; color: #4c63f5; font-size: 0.7rem; font-weight: 750; white-space: nowrap; }

@media (max-width: 420px) {
  .sh-count { display: none; }
  .sd-val { font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sd-pop { animation: none; }
  .sd-half,
  .sd-day::after { transition: none; }
}
