/* The native inputs stay in the DOM and keep submitting; they are only hidden
   once the component has successfully attached. */
.drp-enhanced input[type="date"],
.drp-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.drp-enhanced { position: relative; }
.drp-enhanced .form-label { display: block; }

.drp-trigger {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .6rem .75rem;
  border: 1.5px solid #d9d0bd;
  border-radius: .75rem;
  background: #fff;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.drp-trigger-half { display: flex; flex-direction: column; min-width: 0; flex: 1 1 0; }
.drp-trigger-half small {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #8a8175;
}
.drp-trigger-half strong {
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drp-trigger-nights { flex: 0 0 auto; font-size: .8rem; color: #6b6357; }

.drp-scrim { position: fixed; inset: 0; background: rgba(20, 18, 14, .45); z-index: 1000; }
.drp-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
}
.drp-months { overflow-y: auto; padding: 1rem .75rem 0; overscroll-behavior: contain; }
.drp-month h3 { font-size: 1rem; margin: .75rem 0 .5rem; }

.drp-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.drp-dow { font-size: .7rem; text-align: center; color: #8a8175; font-weight: 700; }
.drp-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 0;
  background: transparent;
  border-radius: .5rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.drp-day.drp-blank { visibility: hidden; }
.drp-day.is-past { color: #cfc8bb; cursor: default; }
.drp-day.is-in-range { background: #f0e7d3; border-radius: 0; }
.drp-day.is-edge { background: #1f1c17; color: #fff; }
.drp-day:focus-visible { outline: 2px solid #1f1c17; outline-offset: -2px; }

.drp-price { font-style: normal; font-size: .65rem; font-weight: 600; color: #2f6b3f; }
.drp-day.is-sold-out { color: #cfc8bb; cursor: default; text-decoration: line-through; }
.drp-day.is-sold-out .drp-price { display: none; }
.drp-day.is-unreachable { color: #cfc8bb; cursor: default; }
.drp-day.is-unreachable .drp-price { opacity: .4; }
.drp-day.is-edge .drp-price { color: #e8dcc0; }

.drp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem;
  border-top: 1px solid #eee7d9;
  padding-bottom: calc(.75rem + env(safe-area-inset-bottom));
}
.drp-summary { font-size: .9rem; }
.drp-apply {
  border: 0;
  border-radius: .6rem;
  padding: .6rem 1.2rem;
  background: #1f1c17;
  color: #f4e9d0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Desktop: a popover with two months side by side instead of a bottom sheet. */
@media (min-width: 48rem) {
  .drp-scrim { background: transparent; }
  .drp-sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40rem;
    max-width: calc(100vw - 2rem);
    border-radius: 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
  }
  .drp-months { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
}
