/* Tour request — branded date picker */

/* form-step-card uses overflow:hidden for rounded corners; that clips the popup. */
.form-step-card:has(.tour-date-picker) {
  overflow: visible;
}

.form-step-card:has(.tour-date-picker) .form-step-header {
  border-top-left-radius: var(--radius-card, 1.25rem);
  border-top-right-radius: var(--radius-card, 1.25rem);
}

.tour-date-picker {
  position: relative;
  z-index: 1;
}

.tour-date-picker:has(.tour-date-panel:not([hidden])) {
  z-index: 50;
}

.tour-date-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.tour-date-trigger__value {
  flex: 1;
  min-width: 0;
}

.tour-date-trigger__value.is-placeholder {
  color: #94a3b8;
}

.dark .tour-date-trigger__value.is-placeholder {
  color: #64748b;
}

.tour-date-trigger__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--color-brand, #005eb8);
}

.tour-date-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 0.5rem);
  left: 0;
  width: min(100%, 20.5rem);
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid rgb(0 94 184 / 0.18);
  background: var(--gradient-surface, linear-gradient(145deg, #f7fbfe 0%, #eef5fb 48%, #e8f2fa 100%));
  box-shadow: var(--shadow-card-hover, 0 16px 32px -8px rgb(0 94 184 / 0.18));
  animation: tour-date-in 180ms var(--motion-spring, cubic-bezier(0.22, 1, 0.36, 1));
}

.dark .tour-date-panel {
  border-color: rgb(0 163 224 / 0.28);
  background: var(--gradient-surface);
}

@keyframes tour-date-in {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tour-date-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tour-date-panel__title {
  margin: 0;
  font-family: Outfit, Inter, system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.dark .tour-date-panel__title {
  color: #f1f5f9;
}

.tour-date-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  border: 1px solid rgb(148 163 184 / 0.35);
  background: rgb(255 255 255 / 0.7);
  color: #334155;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tour-date-nav:hover:not(:disabled) {
  border-color: rgb(0 94 184 / 0.45);
  background: rgb(0 94 184 / 0.08);
  color: var(--color-brand, #005eb8);
}

.tour-date-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.tour-date-nav svg {
  width: 1rem;
  height: 1rem;
}

.dark .tour-date-nav {
  background: rgb(15 23 42 / 0.55);
  border-color: rgb(71 85 105 / 0.7);
  color: #cbd5e1;
}

.tour-date-weekdays,
.tour-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
}

.tour-date-weekday {
  padding: 0.2rem 0;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.dark .tour-date-weekday {
  color: #94a3b8;
}

.tour-date-day {
  appearance: none;
  border: 0;
  background: transparent;
  aspect-ratio: 1;
  border-radius: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.tour-date-day:not(:disabled):hover {
  background: rgb(0 94 184 / 0.12);
  color: var(--color-brand-dark, #00386e);
}

.tour-date-day:not(:disabled):active {
  transform: scale(0.94);
}

.tour-date-day.is-outside {
  visibility: hidden;
  pointer-events: none;
}

.tour-date-day:disabled {
  color: #cbd5e1;
  font-weight: 500;
  cursor: not-allowed;
}

.dark .tour-date-day {
  color: #e2e8f0;
}

.dark .tour-date-day:disabled {
  color: #475569;
}

.tour-date-day.is-tour-day:not(:disabled) {
  background: rgb(0 163 224 / 0.12);
  color: var(--color-brand-dark, #00386e);
  box-shadow: inset 0 0 0 1px rgb(0 94 184 / 0.2);
}

.dark .tour-date-day.is-tour-day:not(:disabled) {
  background: rgb(0 163 224 / 0.16);
  color: #7dd3fc;
  box-shadow: inset 0 0 0 1px rgb(0 163 224 / 0.28);
}

.tour-date-day.is-selected {
  background: var(--gradient-brand, linear-gradient(135deg, #005eb8 0%, #00a3e0 55%, #2dd4bf 100%)) !important;
  color: #fff !important;
  box-shadow: 0 6px 14px -4px rgb(0 94 184 / 0.45) !important;
}

.tour-date-day.is-today:not(.is-selected) {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.tour-date-panel__legend {
  margin: 0.7rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgb(148 163 184 / 0.25);
  font-size: 0.7rem;
  line-height: 1.35;
  color: #64748b;
}

.dark .tour-date-panel__legend {
  border-top-color: rgb(71 85 105 / 0.55);
  color: #94a3b8;
}
