/* ================================================================
   Portal das Marés — Airbnb-Style Booking Calendar
   ================================================================ */

/* ── Date Row ── */
.bw-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(100,90,70,0.2);
  border-radius: 10px;
  overflow: visible;
  margin-bottom: 0;
  cursor: pointer;
}

.bw-date-cell {
  padding: 10px 14px;
  border-right: 1px solid rgba(100,90,70,0.2);
  transition: background 0.15s;
  position: relative;
}
.bw-date-cell--right { border-right: none; }
.bw-date-cell:hover, .bw-date-cell.active {
  background: rgba(107,142,127,0.06);
  border-radius: 10px;
}
.bw-date-cell.has-date .bw-cell-val { color: #1C1C1A; font-weight: 500; }

.bw-cell-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(28,28,26,0.55);
  margin-bottom: 2px;
}

.bw-cell-val {
  display: block;
  font-size: 0.9rem;
  color: rgba(28,28,26,0.45);
  white-space: nowrap;
}

/* ── Calendar Dropdown Panel ── */
.bw-cal-panel {
  background: #fff;
  border: 1px solid rgba(100,90,70,0.15);
  border-radius: 16px;
  box-shadow: 0 16px 56px rgba(0,0,0,0.14);
  margin-top: 8px;
  overflow: hidden;
  z-index: 500;
  position: relative;
}

/* Panel Header */
.bw-cal-hdr {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(100,90,70,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.bw-cal-hdr-left { flex: 1; min-width: 140px; }
.bw-cal-nights-text {
  font-size: 1rem;
  font-weight: 600;
  color: #1C1C1A;
  line-height: 1.3;
}
.bw-cal-dates-text {
  font-size: 0.82rem;
  color: rgba(28,28,26,0.55);
  margin-top: 2px;
}
.bw-cal-hdr-inputs {
  display: flex;
  gap: 8px;
}
.bw-cal-input-box {
  border: 1.5px solid rgba(100,90,70,0.2);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 110px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.bw-cal-input-box label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(28,28,26,0.5);
  margin-bottom: 2px;
}
.bw-cal-input-box span {
  display: block;
  font-size: 0.82rem;
  color: #1C1C1A;
  font-weight: 500;
}
.bw-cal-input-box.active {
  border-color: #1C1C1A;
  box-shadow: 0 0 0 2px rgba(28,28,26,0.12);
}

/* ── Month Grid ── */
.bw-cal-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 16px 20px;
}

@media (max-width: 480px) {
  .bw-cal-months { grid-template-columns: 1fr; }
  .bw-cal-hdr-inputs { display: none; }
}

.bw-month { padding: 0 8px; }
.bw-month + .bw-month { border-left: 1px solid rgba(100,90,70,0.08); }

.bw-month-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.bw-month-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1C1C1A;
  text-align: center;
  flex: 1;
  text-transform: capitalize;
}
.bw-nav-btn {
  background: none;
  border: 1px solid rgba(100,90,70,0.2);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: #1C1C1A;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.bw-nav-btn:hover {
  background: rgba(107,142,127,0.1);
  border-color: #6B8E7F;
}

/* Day labels */
.bw-day-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.bw-day-labels span {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(28,28,26,0.45);
  padding: 4px 0;
}

/* Days grid */
.bw-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.bw-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 400;
  color: #1C1C1A;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  position: relative;
}
.bw-day:hover:not([disabled]):not(.bw-day--start):not(.bw-day--end) {
  background: rgba(107,142,127,0.15);
}
.bw-day--blank { cursor: default; }
.bw-day--past, .bw-day--blocked {
  color: rgba(28,28,26,0.2);
  cursor: not-allowed;
  text-decoration: line-through;
}
.bw-day--today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #6B8E7F;
  border-radius: 50%;
}
.bw-day--start, .bw-day--end {
  background: #1C1C1A !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 50%;
}
.bw-day--range {
  background: rgba(107,142,127,0.15);
  border-radius: 0;
  color: #1C1C1A;
}
/* Range start/end — extend the highlight */
.bw-day--start { border-radius: 50% 0 0 50%; }
.bw-day--end   { border-radius: 0 50% 50% 0; }
/* If start and end same day */
.bw-day--start.bw-day--end { border-radius: 50%; }

/* ── Calendar Footer ── */
.bw-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(100,90,70,0.1);
}
.bw-cal-clear {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  color: #1C1C1A;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.bw-cal-clear:hover { opacity: 0.7; }
.bw-cal-close {
  background: #1C1C1A;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.bw-cal-close:hover { background: #333; }

/* ── Guests Row ── */
.bw-guests-row {
  margin-top: 8px;
  border: 1px solid rgba(100,90,70,0.2);
  border-radius: 10px;
  padding: 10px 14px;
}
.bw-guests-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.bw-guests-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: #1C1C1A;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  padding-right: 24px;
}

/* ── Reserve Button ── */
.bw-reserve-btn {
  transition: background 0.2s, transform 0.15s !important;
}
.bw-reserve-btn.ready {
  background: #6B8E7F !important;
}
.bw-reserve-btn:active { transform: scale(0.98); }
