/* VRBO calendar — inline panel with prices */
.booking-sidebar.calendar-open {
  position: relative;
  z-index: 900;
}

.booking-card.calendar-open {
  z-index: 901;
}

.calendar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 899;
  background: transparent;
}

.calendar-backdrop[hidden] {
  display: none !important;
}

.calendar-panel {
  position: fixed;
  z-index: 900;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
  animation: pickerIn 0.22s ease;
}

.booking-card.calendar-open .booking-price,
.booking-card.calendar-open .btn-reserve,
.booking-card.calendar-open .booking-note,
.booking-card.calendar-open .link-no-refund,
.booking-card.calendar-open .availability-badge,
.booking-card.calendar-open .booking-inputs {
  pointer-events: none;
}

.calendar-panel[hidden] {
  display: none !important;
}

.calendar-panel-inner {
  padding: 20px 16px 16px;
}

@keyframes pickerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.cal-selected-range {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  font-size: 15px;
  font-weight: 600;
  min-height: 28px;
}

.cal-range-arrow {
  color: var(--text-secondary);
  font-weight: 400;
}

.cal-range-placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.cal-nav-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.cal-nav-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 4px;
  border: none;
  background: transparent;
  font-size: 22px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}

.cal-nav-btn:hover {
  background: var(--bg-gray);
}

.cal-months {
  display: flex;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.cal-month {
  width: 280px;
  flex-shrink: 0;
}

.cal-month-title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-cell-btn {
  width: 100%;
  position: relative;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.cal-cell-empty {
  min-height: 52px;
  cursor: default;
}

.cal-cell-btn:hover:not(:disabled):not(.cal-cell-selected) .cal-day-num {
  background: var(--bg-gray);
  border-radius: 50%;
}

.cal-day-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.cal-day-price {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1;
  position: relative;
  z-index: 2;
}

.cal-cell-in-range::before {
  content: "";
  position: absolute;
  inset: 8px 0;
  background: #f0e6d8;
  z-index: 0;
  pointer-events: none;
}

.cal-cell-in-range.cal-cell-start::before {
  left: 50%;
}

.cal-cell-in-range.cal-cell-end::before {
  right: 50%;
}

.cal-cell-start .cal-day-num,
.cal-cell-end .cal-day-num {
  background: var(--vrbo-blue) !important;
  color: #fff;
}

.cal-cell-start .cal-day-price,
.cal-cell-end .cal-day-price {
  color: var(--vrbo-blue);
  font-weight: 600;
}

.cal-cell-blocked,
.cal-cell-btn:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.cal-cell-blocked .cal-day-price,
.cal-cell-btn:disabled .cal-day-price {
  visibility: hidden;
}

.cal-price-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 12px 0 0;
  line-height: 1.4;
}

.picker-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.picker-clear {
  font-size: 14px;
  font-weight: 600;
  color: var(--vrbo-blue);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.picker-apply {
  padding: 10px 32px;
  background: var(--vrbo-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 24px;
  border: none;
  cursor: pointer;
}

.picker-apply:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.picker-apply:not(:disabled):hover {
  background: var(--vrbo-blue-hover);
}

.booking-card.no-dates .availability-badge {
  display: none;
}

.booking-card.no-dates .price-total {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.booking-card.no-dates .price-detail,
.booking-card.no-dates .price-nightly,
.booking-card.no-dates .price-taxes {
  display: none;
}

.booking-card.no-dates .btn-reserve {
  opacity: 0.45;
  pointer-events: none;
}

.field-placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.picker-popup {
  position: absolute;
  z-index: 500;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  padding: 20px;
  animation: pickerIn 0.2s ease;
}

.guests-popup { width: 320px; }

.guests-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 16px;
}

.guests-sub {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.guests-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guests-minus,
.guests-plus {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  cursor: pointer;
}

.guests-minus:disabled,
.guests-plus:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.guests-count {
  font-size: 16px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.guests-popup .picker-footer {
  justify-content: flex-end;
}

.guests-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text-primary);
}

.guests-label strong {
  font-size: 16px;
  font-weight: 600;
}

.guests-age-field {
  position: relative;
  border: 1px solid var(--vrbo-blue);
  border-radius: 8px;
  padding: 7px 14px;
  margin: 0 0 12px;
}

.guests-age-field label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 1px;
}

.guests-age-field select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  padding: 0 28px 0 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.guests-age-field .field-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.guests-pets {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 18px;
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
}

.guests-pets input {
  width: 18px;
  height: 18px;
  accent-color: var(--vrbo-blue);
  flex-shrink: 0;
}

.guests-apply {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 24px;
}

.booking-field-clickable {
  cursor: pointer;
  transition: background 0.15s;
}

.booking-field-clickable:hover,
.booking-field-clickable.active {
  background: var(--bg-gray);
}

@media (max-width: 1100px) {
  .calendar-panel {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%);
    width: calc(100vw - 32px) !important;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .cal-months {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 600px) {
  .cal-month {
    width: 100%;
  }
}
