/* Themed booking pickers — shared by booking / airport / excursions */

.tm-bp-field-wrap {
  position: relative;
  width: 100%;
  display: block;
}

.tm-bp-native.tm-bp-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

button.tm-bp-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.625rem;
  padding: 0.5rem 0.85rem;
  padding-left: 2.25rem;
  border: 1px solid rgb(209 213 219);
  border-radius: 0.375rem;
  background: #fff;
  color: #003580;
  font-size: 0.875rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

button.tm-bp-trigger:hover {
  border-color: #0ea5e9;
}

button.tm-bp-trigger:focus {
  outline: none;
  border-color: #003580;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.35);
}

.tm-bp-field-wrap .tm-bp-icon {
  pointer-events: none;
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
}

.tm-bp-field-wrap .tm-bp-icon[src] {
  object-fit: contain;
}

.tm-bp-trigger .tm-bp-trigger-chev {
  margin-left: auto;
  opacity: 0.55;
  font-size: 0.65rem;
}

.tm-bp-placeholder {
  color: #64748b;
}

/* Modal / sheet */

.tm-bp-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(15, 23, 42, 0.45);
  animation: tm-bp-fade-in 0.18s ease;
}

@keyframes tm-bp-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tm-bp-sheet {
  width: 100%;
  max-width: 440px;
  max-height: min(88vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 48%);
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -12px 40px rgba(0, 53, 128, 0.18);
  animation: tm-bp-slide-up 0.22s ease;
}

@media (min-width: 640px) {
  .tm-bp-overlay {
    align-items: center;
    padding: 1.5rem;
  }

  .tm-bp-sheet {
    border-radius: 1rem;
    box-shadow: 0 24px 64px rgba(0, 53, 128, 0.22);
    max-height: min(82vh, 560px);
  }
}

@keyframes tm-bp-slide-up {
  from {
    transform: translateY(102%);
    opacity: 0.85;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.tm-bp-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: linear-gradient(135deg, #003580 0%, #0c4da2 65%, #0ea5e9 160%);
  color: #fff;
  flex-shrink: 0;
}

.tm-bp-head h2 {
  margin: 0;
  flex: 1;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tm-bp-close {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tm-bp-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.tm-bp-body {
  overflow: auto;
  padding: 1rem;
  flex: 1;
  min-height: 0;
}

/* Calendar */

.tm-bp-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.tm-bp-cal-nav button {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  color: #003580;
  font-weight: 600;
}

.tm-bp-cal-nav button:hover {
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.tm-bp-cal-month {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9rem;
}

.tm-bp-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

.tm-bp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}

.tm-bp-day {
  aspect-ratio: 1;
  max-height: 2.65rem;
  border: none;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, transform 0.12s;
}

.tm-bp-day:hover:not(:disabled):not(.tm-bp-day-muted) {
  background: rgba(14, 165, 233, 0.2);
  color: #003580;
}

.tm-bp-day-muted {
  background: transparent;
  color: #cbd5e1;
  cursor: default;
}

.tm-bp-day:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.tm-bp-day.tm-bp-day-selected {
  background: linear-gradient(135deg, #003580, #0ea5e9);
  color: #fff;
}

.tm-bp-day.tm-bp-day-out {
  visibility: hidden;
  pointer-events: none;
}

/* Time grid */

.tm-bp-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
  gap: 0.45rem;
}

.tm-bp-chip {
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.55rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #003580;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.tm-bp-chip:hover {
  border-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.08);
}

.tm-bp-chip.tm-bp-chip-on {
  border-color: #003580;
  background: rgba(0, 53, 128, 0.08);
  box-shadow: 0 2px 8px rgba(0, 53, 128, 0.12);
}

/* Select-style grid */

.tm-bp-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
  gap: 0.5rem;
}

.tm-bp-opt {
  border: 2px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.65rem 0.35rem;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  transition: border-color 0.12s, transform 0.12s;
}

.tm-bp-opt:hover {
  border-color: #0ea5e9;
  color: #003580;
}

.tm-bp-opt.tm-bp-opt-on {
  border-color: #003580;
  background: rgba(14, 165, 233, 0.1);
  color: #003580;
}

/* Hide native right-side chevron when select is replaced (e.g. excursions time field) */
.relative .tm-bp-field-wrap ~ svg.absolute {
  display: none !important;
}
