/**
 * Villa Booking Widget — Styles
 *
 * Premium inline calendar with price per day,
 * range highlighting, and live total.
 *
 * @package id-real-villas
 */

/* ── Container reset ─────────────────────────────────────── */
#idrv-booking-widget {
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Price header ────────────────────────────────────────── */
.idrv-bw-price-header {
  margin-bottom: 16px;
}

.idrv-bw-price {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

.dark .idrv-bw-price {
  color: #f1f5f9;
}

.idrv-bw-per {
  font-size: 14px;
  font-weight: 400;
  color: #9ca3af;
  margin-left: 4px;
}

/* ── Date tabs ───────────────────────────────────────────── */
.idrv-bw-date-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2px;
}

.dark .idrv-bw-date-tabs {
  border-color: #4b5563;
}

.idrv-bw-tab {
  background: transparent;
  border: none;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.idrv-bw-tab:first-child {
  border-right: 1.5px solid #d1d5db;
}

.dark .idrv-bw-tab:first-child {
  border-right-color: #4b5563;
}

.idrv-bw-tab:hover {
  background: #f9fafb;
}

.dark .idrv-bw-tab:hover {
  background: #1e293b;
}

.idrv-bw-tab.active {
  background: #f0fdf4;
  box-shadow: inset 0 0 0 2px #8F9779;
}

.dark .idrv-bw-tab.active {
  background: rgba(143, 151, 121, 0.15);
}

.idrv-bw-tab-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 2px;
}

.idrv-bw-tab-value {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
}

.dark .idrv-bw-tab-value {
  color: #e5e7eb;
}

/* ── Calendar ────────────────────────────────────────────── */
.idrv-bw-calendar {
  border: 1.5px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 12px;
  margin-bottom: 14px;
  background: #fff;
}

.dark .idrv-bw-calendar {
  border-color: #4b5563;
  background: #1e293b;
}

/* Nav */
.idrv-bw-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.idrv-bw-cal-month {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.dark .idrv-bw-cal-month {
  color: #f1f5f9;
}

.idrv-bw-nav-btn {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 16px;
  cursor: pointer;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.dark .idrv-bw-nav-btn {
  border-color: #4b5563;
  color: #d1d5db;
}

.idrv-bw-nav-btn:hover {
  background: #f3f4f6;
  border-color: #8F9779;
}

.dark .idrv-bw-nav-btn:hover {
  background: #334155;
}

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

.idrv-bw-cal-hdr {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 4px 0;
  letter-spacing: 0.05em;
}

/* Cells */
.idrv-bw-cal-cell {
  position: relative;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
  padding: 4px 2px;
  gap: 1px;
}

.idrv-bw-cal-cell:hover:not(.disabled):not(.empty) {
  background: #f0fdf4;
}

.dark .idrv-bw-cal-cell:hover:not(.disabled):not(.empty) {
  background: rgba(143, 151, 121, 0.15);
}

.idrv-bw-cal-cell.empty {
  cursor: default;
}

.idrv-bw-cal-cell.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.idrv-bw-cal-cell.today {
  box-shadow: inset 0 0 0 1.5px #8F9779;
}

/* Selection states */
.idrv-bw-cal-cell.selected {
  background: #8F9779 !important;
  border-radius: 8px;
}

.idrv-bw-cal-cell.selected .idrv-bw-day-num {
  color: #fff;
  font-weight: 700;
}

.idrv-bw-cal-cell.selected .idrv-bw-day-price {
  color: rgba(255, 255, 255, 0.85);
}

.idrv-bw-cal-cell.in-range {
  background: rgba(143, 151, 121, 0.12);
  border-radius: 0;
}

.dark .idrv-bw-cal-cell.in-range {
  background: rgba(143, 151, 121, 0.2);
}

.idrv-bw-cal-cell.checkin {
  border-radius: 8px 0 0 8px;
}

.idrv-bw-cal-cell.checkout {
  border-radius: 0 8px 8px 0;
}

/* Day number */
.idrv-bw-day-num {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.2;
}

.dark .idrv-bw-day-num {
  color: #e5e7eb;
}

/* Price per day */
.idrv-bw-day-price {
  font-size: 9px;
  font-weight: 600;
  color: #6b7280;
  line-height: 1;
}

.idrv-bw-day-price.custom {
  color: #b45309;
}

.dark .idrv-bw-day-price {
  color: #9ca3af;
}

/* Blocked indicator */
.idrv-bw-day-blocked {
  font-size: 9px;
  color: #ef4444;
  line-height: 1;
}

/* ── Guest selector ──────────────────────────────────────── */
.idrv-bw-guests {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.dark .idrv-bw-guests {
  border-color: #4b5563;
}

.idrv-bw-guests-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.dark .idrv-bw-guests-label {
  color: #e5e7eb;
}

.idrv-bw-icon {
  font-size: 20px;
  color: #6b7280;
}

.idrv-bw-guests-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.idrv-bw-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #d1d5db;
  background: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  line-height: 1;
}

.dark .idrv-bw-qty-btn {
  border-color: #4b5563;
  color: #d1d5db;
}

.idrv-bw-qty-btn:hover:not([disabled]) {
  border-color: #8F9779;
  background: #f0fdf4;
}

.dark .idrv-bw-qty-btn:hover:not([disabled]) {
  background: rgba(143, 151, 121, 0.15);
}

.idrv-bw-qty-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

.idrv-bw-qty-val {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  min-width: 20px;
  text-align: center;
}

.dark .idrv-bw-qty-val {
  color: #f1f5f9;
}

/* ── Price breakdown ─────────────────────────────────────── */
.idrv-bw-breakdown {
  margin-bottom: 14px;
  padding: 12px 0;
  border-top: 1px solid #e5e7eb;
}

.dark .idrv-bw-breakdown {
  border-top-color: #374151;
}

.idrv-bw-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #4b5563;
  padding: 3px 0;
}

.dark .idrv-bw-line {
  color: #9ca3af;
}

.idrv-bw-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid #e5e7eb;
}

.dark .idrv-bw-total {
  color: #f1f5f9;
  border-top-color: #374151;
}

/* ── Error ───────────────────────────────────────────────── */
.idrv-bw-error {
  font-size: 12px;
  color: #dc2626;
  margin-bottom: 10px;
  text-align: center;
}

/* ── Book button ─────────────────────────────────────────── */
.idrv-bw-book-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #8F9779, #7A7B6A);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(143, 151, 121, 0.35);
}

.idrv-bw-book-btn:hover:not([disabled]) {
  background: linear-gradient(135deg, #7A7B6A, #6B6C5B);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(143, 151, 121, 0.45);
}

.idrv-bw-book-btn:active:not([disabled]) {
  transform: scale(0.97);
}

.idrv-bw-book-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Note ────────────────────────────────────────────────── */
.idrv-bw-note {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 10px;
}
