/* ============================================================
   RnB Airbnb-Style Calendar Modal
   Part of the RnB Date Range Pricing plugin (rnb-date-range-pricing)
   ============================================================ */

/* Hide the return-datetime wrapper */
.rnb-return-datetime-wrapper {
  display: none !important;
}

/* === Trigger Button === */
.rnb-cal-trigger-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}

.rnb-cal-trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 18px;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  color: #222;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.rnb-cal-trigger:hover,
.rnb-cal-trigger:focus {
  border-color: #222;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  outline: none;
}

.rnb-cal-trigger-icon {
  display: flex;
  align-items: center;
  color: #555;
  flex-shrink: 0;
}

.rnb-cal-trigger-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.rnb-cal-trigger-label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 3px;
}

.rnb-cal-trigger-value {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rnb-cal-trigger-value.placeholder {
  color: #aaa;
  font-weight: 400;
}

/* === Overlay Panel === */
.rnb-cal-overlay {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 99999;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 24px 28px 20px;
  min-width: 680px;
  width: max-content;
  max-width: 96vw;
}

.rnb-cal-overlay.rnb-cal-open {
  display: block;
  animation: rnbCalFadeIn 0.18s ease;
}

@keyframes rnbCalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Calendar Body === */
.rnb-cal-body {
  display: flex;
  gap: 40px;
}

.rnb-cal-month {
  flex: 1;
  min-width: 280px;
}

.rnb-cal-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.rnb-cal-month-nav {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  font-size: 16px;
  color: #333;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.rnb-cal-month-nav:hover {
  background: #f0f0f0;
}

.rnb-cal-month-nav.hidden {
  visibility: hidden;
  pointer-events: none;
}

.rnb-cal-month-title {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.01em;
}

/* === Weekday Headers + Grid Rows === */
.rnb-cal-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  padding: 4px 0 10px;
  letter-spacing: 0.04em;
}

.rnb-cal-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

/* === Day Cells === */
.rnb-cal-day {
  position: relative;
  text-align: center;
  padding: 6px 2px;
  font-size: 14px;
  color: #222;
  cursor: pointer;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  user-select: none;
  z-index: 1;
}

.rnb-cal-day:hover:not(.disabled):not(.empty) {
  background: #f0f0f0;
}

.rnb-cal-day.disabled {
  color: #ccc;
  cursor: default;
  pointer-events: none;
}

.rnb-cal-day.empty {
  pointer-events: none;
}

/* Selected start / end */
.rnb-cal-day.selected-start,
.rnb-cal-day.selected-end {
  background: #222 !important;
  color: #fff !important;
  border-radius: 50%;
  font-weight: 600;
  z-index: 2;
}

/* Same-day booking: one date = pickup & dropoff, use time pickers for duration */
.rnb-cal-day.selected-same-day {
  background: #222 !important;
  color: #fff !important;
  border-radius: 50%;
  font-weight: 600;
  z-index: 2;
  box-shadow: 0 0 0 4px rgba(34, 34, 34, 0.12);
}

/* In-range highlight */
.rnb-cal-day.in-range {
  background: #f2f2f2;
  border-radius: 0;
  color: #222;
}

.rnb-cal-day.range-start-row {
  border-radius: 50% 0 0 50%;
  background: #f2f2f2;
}

.rnb-cal-day.range-end-row {
  border-radius: 0 50% 50% 0;
  background: #f2f2f2;
}

.rnb-cal-day.selected-start.range-start-row,
.rnb-cal-day.selected-end.range-end-row {
  border-radius: 50%;
}

/* === Day-count hover tooltip === */
.rnb-cal-day-tooltip {
  display: none;
  position: absolute;
  background: #222;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
  transform: translate(-50%, calc(-100% - 10px));
}

.rnb-cal-day-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #222;
}

.rnb-cal-day-tooltip.visible {
  display: block;
}

/* === Instruction hint === */
.rnb-cal-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #888;
  text-align: center;
  min-height: 18px;
  font-style: italic;
}

/* === Footer === */
.rnb-cal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.rnb-cal-reset {
  background: none;
  border: none;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 0;
  transition: color 0.15s;
}

.rnb-cal-reset:hover {
  color: #000;
}

.rnb-cal-done {
  background: #fff;
  border: 1.5px solid #222;
  color: #222;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 26px;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.rnb-cal-done:hover {
  background: #222;
  color: #fff;
}

/* === Time row — native <select> dropdowns === */
.rnb-cal-time-row {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.rnb-cal-time-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rnb-cal-time-label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rnb-cal-time-select {
  width: 100%;
  height: 40px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 0 36px 0 10px;
  font-size: 14px;
  color: #222;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.rnb-cal-time-select:focus {
  border-color: #222;
  outline: none;
  box-shadow: 0 0 0 2px rgba(34, 34, 34, 0.08);
}

/* === Responsive === */
@media (max-width: 720px) {
  .rnb-cal-overlay {
    min-width: auto;
    width: calc(100vw - 20px);
    left: 50%;
    transform: translateX(-50%);
    padding: 18px 14px 16px;
  }

  .rnb-cal-body {
    flex-direction: column;
    gap: 24px;
  }

  .rnb-cal-month {
    min-width: auto;
  }

  .rnb-cal-time-row {
    flex-direction: column;
    gap: 12px;
  }
}

.date-time-picker.rnb-component-wrapper {
  display: none !important;
}