.dtk-rental-availability {
  --dtk-rental-gap: 0.2rem;
  --dtk-rental-cal-cell: 2rem;
  --dtk-rental-panel-gap: 0.5rem;
  max-width: min(100%, 42rem);
  min-width: 0;
}

.dtk-rental-availability.alignwide,
.dtk-rental-availability.alignfull {
  max-width: none;
}

.dtk-rental-notice {
  margin: 0 0 0.5rem;
  color: #666;
}

.dtk-rental-layout {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.dtk-rental-layout__panel {
  display: flex;
  flex-direction: column;
  gap: var(--dtk-rental-panel-gap);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  container-type: inline-size;
  container-name: rental-panel;
}

.dtk-rental-layout__panel .dtk-rental-checkout-anchor {
  margin-top: 0;
  width: 100%;
}

.dtk-rental-layout__cal {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

@media (min-width: 640px) {
  .dtk-rental-layout {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .dtk-rental-availability.alignwide .dtk-rental-layout,
  .dtk-rental-availability.alignfull .dtk-rental-layout {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.dtk-rental-layout__panel .dtk-rental-times,
.dtk-rental-layout__panel .dtk-rental-guests,
.dtk-rental-layout__panel .dtk-rental-selection,
.dtk-rental-layout__panel .dtk-rental-buy {
  margin-top: 0;
}

.dtk-rental-cal {
  width: fit-content;
  max-width: 100%;
}

.dtk-rental-cal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.dtk-rental-cal__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  flex: 1;
}

.dtk-rental-cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, var(--dtk-rental-cal-cell));
  gap: var(--dtk-rental-gap);
}

.dtk-rental-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, var(--dtk-rental-cal-cell));
  grid-template-rows: repeat(6, var(--dtk-rental-cal-cell));
  gap: var(--dtk-rental-gap);
}

.dtk-rental-cal__weekday {
  text-align: center;
  font-size: 0.6875rem;
  opacity: 0.7;
  line-height: 1.2;
}

.dtk-rental-cal__day {
  aspect-ratio: unset;
  width: var(--dtk-rental-cal-cell);
  height: var(--dtk-rental-cal-cell);
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  padding: 0;
  line-height: 1;
}

.dtk-rental-cal__day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.dtk-rental-cal__day.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dtk-rental-cal__day.is-available:hover:not(.is-disabled) {
  border-color: currentColor;
}

.dtk-rental-cal__day.is-selected,
.dtk-rental-cal__day.is-in-range {
  background: rgba(0, 0, 0, 0.08);
  border-color: currentColor;
}

.dtk-rental-slots {
  margin-top: 0.5rem;
}

.dtk-rental-times {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 0.75rem;
  width: 100%;
}

.dtk-rental-times__field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  position: relative;
}

.dtk-rental-times__label {
  font-size: 0.75rem;
  font-weight: 600;
}

.dtk-rental-times__field input[type='time'] {
  width: 6.5rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.dtk-rental-times__field input[type='time']::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

.dtk-rental-times__field input[type='time']::-webkit-clear-button {
  display: none;
}

.dtk-rental-times__field input[type='time']::-moz-calendar-picker-indicator {
  opacity: 0;
  width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.dtk-rental-times__error {
  display: none;
}

.dtk-rental-selection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.35rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
  width: 100%;
}

.dtk-rental-selection__hint {
  display: none;
}

.dtk-rental-selection__field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.dtk-rental-selection__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.75;
}

.dtk-rental-selection output {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  min-height: 1.25em;
  overflow-wrap: anywhere;
}

.dtk-rental-cal__day.is-range-start,
.dtk-rental-cal__day.is-range-end {
  background: rgba(0, 0, 0, 0.12);
  border-color: currentColor;
  font-weight: 700;
}

.dtk-rental-slots__title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.dtk-rental-slot {
  display: block;
  width: 100%;
  margin-bottom: 0.35rem;
  text-align: left;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
}

.dtk-rental-slot.is-selected {
  background: rgba(0, 0, 0, 0.08);
}

.dtk-rental-buy {
  margin-top: 0;
  align-self: start;
}

@media (min-width: 640px) {
  .dtk-rental-layout__panel .dtk-rental-buy {
    width: auto;
  }
}

.dtk-rental-guests {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.35rem 0.75rem;
  width: 100%;
}

.dtk-rental-guests__title {
  width: 100%;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.dtk-rental-guests__field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.dtk-rental-guests__label {
  font-size: 0.75rem;
  font-weight: 600;
}

.dtk-rental-guests__field select {
  width: 6.5rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

@container rental-panel (max-width: 22rem) {
  .dtk-rental-times__field input[type='time'],
  .dtk-rental-guests__field select {
    width: 100%;
  }
}

@media (pointer: coarse) {
  .dtk-rental-availability {
    --dtk-rental-cal-cell: 2.25rem;
  }
}
