/* ============================================
   TRAVELLIR — Booking Widget Styles v3
   Airbnb-Inspired Clean Design
   ============================================ */

/* ---- Widget Outer Shell ---- */
.booking-widget {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.booking-widget::before,
.booking-widget::after { display: none; }

/* ---- Header ---- */
.booking-widget__header {
  text-align: left;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ebebeb;
}

.booking-widget__title {
  font-family: var(--font-body);
  font-size: 1.3rem;
  color: #222;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.booking-widget__title span {
  font-weight: 400;
  font-size: 0.88rem;
  color: #717171;
}

.booking-widget__subtitle {
  color: #717171;
  font-size: 0.82rem;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.booking-widget__subtitle svg {
  width: 13px;
  height: 13px;
  fill: #222;
}

/* ---- Date Chips ---- */
.bw-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  margin-bottom: 12px;
  border: 1px solid #b0b0b0;
  border-radius: 8px;
  overflow: hidden;
}

.bw-date-chip {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  border: none;
  border-right: 1px solid rgba(0,0,0,0.06);
  border-radius: 0;
  padding: 10px 12px;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  min-width: 0;
}

.bw-date-chip:last-child { border-right: none; }

.bw-date-chip:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.bw-date-chip--active {
  background: #fff !important;
  box-shadow: inset 0 0 0 2px #222;
}

.bw-date-chip__label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 2px;
}

.bw-date-chip__value {
  font-size: 0.82rem;
  font-weight: 400;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-date-chip__placeholder {
  font-size: 0.82rem;
  color: #b0b0b0;
}

.bw-dates__arrow { display: none; }

/* ---- Min Stay Notice ---- */
.bw-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: #b91c1c;
  letter-spacing: 0;
}

/* ---- Calendar ---- */
.bw-calendar {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.bw-calendar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.bw-calendar__nav-btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  color: #222;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.bw-calendar__nav-btn:hover {
  background: #f7f7f7;
  border-color: #222;
}

.bw-calendar__month-label {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: #222;
  letter-spacing: 0;
}

/* Weekday headers */
.bw-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.bw-calendar__weekday {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #717171;
  padding: 4px 0 8px;
}

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

.bw-calendar__day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: #222;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  user-select: none;
}

.bw-calendar__day:hover:not(.bw-calendar__day--blocked):not(.bw-calendar__day--empty):not(.bw-calendar__day--past) {
  background: #f7f7f7;
  color: #222;
}

.bw-calendar__day--empty { cursor: default; }

.bw-calendar__day--past {
  color: #ddd;
  cursor: not-allowed;
}

.bw-calendar__day--blocked {
  color: #ddd;
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-color: #ddd;
}

.bw-calendar__day--blocked::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: transparent;
  border: none;
}

.bw-calendar__day--today {
  color: var(--logo-red);
  font-weight: 700;
}

.bw-calendar__day--today::before {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--logo-red);
}

/* Selected & range */
.bw-calendar__day--selected {
  background: var(--logo-red) !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 50% !important;
  box-shadow: none;
  z-index: 1;
}

.bw-calendar__day--in-range {
  background: #fde8e8;
  color: #222;
  border-radius: 0;
  font-weight: 500;
}

.bw-calendar__day--range-start {
  border-radius: 50% 0 0 50%;
}

.bw-calendar__day--range-end {
  border-radius: 0 50% 50% 0;
}

/* Legend */
.bw-calendar__legend {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ebebeb;
  flex-wrap: wrap;
}

.bw-calendar__legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: #717171;
  letter-spacing: 0;
}

.bw-calendar__legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bw-calendar__legend-dot--available {
  background: #f7f7f7;
  border: 1px solid #ddd;
}

.bw-calendar__legend-dot--blocked {
  background: #fde8e8;
  border: 1px solid #fecaca;
}

.bw-calendar__legend-dot--selected {
  background: var(--logo-red);
}

/* ---- Booking Form ---- */
.bw-form {
  display: grid;
  gap: 12px;
}

.bw-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .bw-form__row { grid-template-columns: 1fr; }
}

.bw-form__group { position: relative; }

.bw-form__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 6px;
}

.bw-form__input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  color: #222;
  background: #fff;
  border: 1px solid #b0b0b0;
  border-radius: 8px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.bw-form__input:focus {
  border-color: #222;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.bw-form__input::placeholder {
  color: #b0b0b0;
}

/* Guest counter */
.bw-guest-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.bw-guest-counter:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0,0,0,0.2);
}

.bw-guest-counter__btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #b0b0b0;
  border-radius: 50%;
  color: #717171;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
  line-height: 1;
}

.bw-guest-counter__btn:hover {
  border-color: #222;
  color: #222;
}

.bw-guest-counter__value {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  min-width: 24px;
  text-align: center;
}

.bw-guest-counter__label {
  font-size: 0.82rem;
  color: #717171;
  margin-left: auto;
}

/* ---- Price Breakdown ---- */
.bw-pricing {
  background: #fff;
  border: none;
  border-radius: 0;
  padding: 16px 0 0;
  margin-top: 12px;
  border-top: 1px solid #ebebeb;
}

.bw-pricing__header {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: #222;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: none;
}

.bw-pricing__line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.88rem;
}

.bw-pricing__line-label {
  color: #484848;
  text-decoration: underline;
  text-decoration-color: #ddd;
}

.bw-pricing__line-value {
  color: #484848;
  font-weight: 400;
}

.bw-pricing__line--discount .bw-pricing__line-label,
.bw-pricing__line--discount .bw-pricing__line-value {
  color: #008a05;
}

.bw-pricing__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px solid #ddd;
}

.bw-pricing__total-label {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: #222;
  font-weight: 600;
}

.bw-pricing__total-value {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: #222;
  font-weight: 600;
  letter-spacing: 0;
}

/* ---- Book Button ---- */
.bw-book-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  background: linear-gradient(to right, var(--logo-red), var(--logo-red-dark));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: none;
}

.bw-book-btn:hover {
  transform: none;
  opacity: 0.92;
  box-shadow: none;
}

.bw-book-btn:active {
  transform: scale(0.98);
}

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

.bw-book-btn__shimmer { display: none; }

/* ---- Secure Badge ---- */
.bw-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.74rem;
  color: #717171;
  letter-spacing: 0;
}

.bw-secure svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ---- Loading State ---- */
.bw-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 16px;
}

.bw-loading__spinner {
  width: 36px;
  height: 36px;
  border: 2.5px solid #ebebeb;
  border-top-color: var(--logo-red);
  border-radius: 50%;
  animation: bw-spin 0.75s linear infinite;
}

@keyframes bw-spin { to { transform: rotate(360deg); } }

.bw-loading__text {
  font-size: 0.82rem;
  color: #717171;
  letter-spacing: 0;
}

/* ---- Error / Success ---- */
.bw-error {
  padding: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #b91c1c;
  font-size: 0.86rem;
  text-align: center;
}

.bw-success {
  padding: 24px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  text-align: center;
}

.bw-success__icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.bw-success__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #222;
  margin-bottom: 8px;
}

.bw-success__text {
  font-size: 0.88rem;
  color: #717171;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .booking-widget {
    padding: 20px 16px;
    border-radius: 12px;
  }

  .bw-calendar {
    padding: 12px;
  }

  .bw-calendar__day {
    font-size: 0.76rem;
  }

  .bw-calendar__month-label {
    font-size: 0.85rem;
  }

  .bw-dates {
    grid-template-columns: 1fr 1fr;
  }

  .bw-pricing__total-value {
    font-size: 0.88rem;
  }
}


/* ---- Skeleton Loaders ---- */
.bw-pricing__skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.bw-pricing__skeleton-row {
  height: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: bwSkeletonShimmer 1.5s infinite;
  border-radius: 4px;
  width: 100%;
}

.bw-pricing__skeleton-row--short {
  width: 60%;
}

.bw-pricing__skeleton-total {
  height: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: bwSkeletonShimmer 1.5s infinite;
  border-radius: 6px;
  width: 100%;
  margin-top: 8px;
}

@keyframes bwSkeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.bw-pricing__empty-state {
  color: rgba(0,0,0,0.4);
  font-size: 0.88rem;
  text-align: center;
  padding: var(--space-md) 0;
  background: rgba(0,0,0,0.02);
  border-radius: 8px;
  margin-top: 12px;
}

/* ---- Premium Add-on (Kitchen Experience) ---- */
.bw-addon {
  margin-top: var(--space-lg);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bw-addon--premium {
  background: linear-gradient(135deg, rgba(212,165,83,0.1), rgba(212,165,83,0.02));
  border: 1px solid rgba(212,165,83,0.25);
  box-shadow: 0 4px 20px rgba(212,165,83,0.05);
  position: relative;
  overflow: hidden;
}

.bw-addon--premium::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #D4A553, transparent);
  opacity: 0.5;
}

.bw-addon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212,165,83,0.15);
  border-color: rgba(212,165,83,0.4);
}

.bw-addon__label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 16px;
  margin: 0;
}

.bw-addon__checkbox-wrapper {
  position: relative;
  margin-top: 2px;
}

.bw-addon__checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.bw-addon__checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(212,165,83,0.4);
  border-radius: 6px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.bw-addon__checkbox-custom svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
}

.bw-addon__checkbox:checked ~ .bw-addon__checkbox-custom {
  background: linear-gradient(135deg, #D4A553, #b8892e);
  border-color: #b8892e;
  box-shadow: 0 2px 8px rgba(212,165,83,0.4);
}

.bw-addon__checkbox:checked ~ .bw-addon__checkbox-custom svg {
  opacity: 1;
  transform: scale(1);
}

.bw-addon__content {
  flex: 1;
}

.bw-addon__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #222;
  display: block;
  letter-spacing: -0.01em;
}

.bw-addon__desc {
  font-size: 0.78rem;
  color: #717171;
  line-height: 1.5;
  display: block;
  margin-top: 4px;
}
