/* Airbnb Parity Frontend Widget Styles */
.hb-booking-widget-wrapper {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #222222;
}

.hb-booking-form {
    background: #ffffff;
    border: 1px solid #dddddd;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 372px; /* standard Airbnb widget width */
    box-sizing: border-box;
}

.hb-booking-form__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.hb-booking-form__price {
    font-size: 22px;
    font-weight: 600;
}

.hb-booking-form__per-night {
    font-size: 16px;
    color: #717171;
}

/* Inputs Box (The bordered wrapper around dates and guests) */
.hb-booking-form__inputs-box {
    border: 1px solid #b0b0b0;
    border-radius: 12px;
    margin-bottom: 16px;
    background: #ffffff;
}

.hb-booking-form__dates {
    display: flex;
    border-bottom: 1px solid #b0b0b0;
}

.hb-booking-form__date-field {
    flex: 1;
    padding: 12px;
    position: relative;
}

.hb-booking-form__date-separator {
    width: 1px;
    background-color: #b0b0b0;
}

.hb-booking-form__date-field label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #222222;
    margin-bottom: 2px;
}

.hb-booking-form .hb-booking-form__date-field input {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: #222222 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
}

.hb-booking-form .hb-booking-form__date-field input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.hb-booking-form__guests {
    position: relative;
    width: 100%;
}

/* The collapsed "N guests" summary row.
   !important is used throughout the guest control to defeat the host theme's
   generic <button> styling (borders, backgrounds, focus rings, widths). */
.hb-booking-form .hb-guests-toggle {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 12px !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    cursor: pointer;
    text-align: left !important;
    box-sizing: border-box !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: #222222 !important;
}

.hb-booking-form .hb-guests-toggle:hover,
.hb-booking-form .hb-guests-toggle:focus,
.hb-booking-form .hb-guests-toggle:active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #222222 !important;
}

.hb-guests-toggle__inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hb-guests-toggle__label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: #222222;
    letter-spacing: 0.04em;
}

.hb-guests-toggle__value {
    font-size: 14px;
    color: #222222;
}

.hb-guests-toggle__chevron {
    display: flex;
    align-items: center;
    color: #222222;
    transition: transform 0.2s ease;
}

.hb-guests-toggle[aria-expanded="true"] .hb-guests-toggle__chevron {
    transform: rotate(180deg);
}

/* The expanding guest stepper popover */
.hb-guests-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
    padding: 16px 24px;
    z-index: 30;
    box-sizing: border-box;
}

.hb-guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #ebebeb;
}

.hb-guest-row:last-of-type {
    border-bottom: none;
}

.hb-guest-row__name {
    font-size: 16px;
    font-weight: 600;
    color: #222222;
}

.hb-guest-row__desc {
    font-size: 13px;
    color: #717171;
    margin-top: 2px;
}

.hb-guest-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hb-booking-form .hb-step {
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    border-radius: 50% !important;
    border: 1px solid #b0b0b0 !important;
    background: #ffffff !important;
    color: #717171 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.hb-booking-form .hb-step:hover:not(:disabled) {
    border-color: #222222 !important;
    color: #222222 !important;
    background: #ffffff !important;
}

.hb-booking-form .hb-step:disabled {
    border-color: #ebebeb !important;
    color: #dddddd !important;
    background: #ffffff !important;
    cursor: not-allowed;
}

.hb-step__count {
    min-width: 24px;
    text-align: center;
    font-size: 16px;
    color: #222222;
}

.hb-booking-form .hb-guests-close {
    display: block !important;
    margin-left: auto !important;
    margin-top: 12px !important;
    width: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #222222 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: underline !important;
    cursor: pointer;
    padding: 4px !important;
    height: auto !important;
}

.hb-booking-form .hb-guests-close:hover {
    background: transparent !important;
    color: #222222 !important;
}

/* Reserve Button.
   !important defeats the host theme's .button / button styling. */
.hb-booking-form .hb-booking-form__submit,
.hb-booking-form .hb-booking-form__submit.button {
    display: block !important;
    width: 100% !important;
    background: linear-gradient(to right, #E61E4D 0%, #E31C5F 50%, #D70466 100%) !important;
    background-color: #E31C5F !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px 24px !important;
    margin: 8px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
    text-shadow: none !important;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.15s ease;
    text-align: center !important;
    position: relative;
    height: auto !important;
}

.hb-booking-form .hb-booking-form__submit:hover {
    background: linear-gradient(to right, #E61E4D 0%, #E31C5F 50%, #D70466 100%) !important;
    color: #ffffff !important;
    filter: brightness(1.05);
}

.hb-booking-form .hb-booking-form__submit:active {
    transform: scale(0.98);
}

.hb-booking-form .hb-booking-form__submit:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed;
}

.hb-booking-form .hb-booking-form__submit .btn-text {
    color: #ffffff !important;
}

.hb-booking-form__no-charge-text {
    text-align: center;
    font-size: 14px;
    color: #717171;
    margin-bottom: 24px;
}

/* Summary Lines */
.hb-booking-form__summary {
    border-top: 1px solid #dddddd;
    padding-top: 16px;
}

.hb-booking-form__summary-loading {
    text-align: center;
    color: #717171;
    font-size: 14px;
}

.hb-booking-form__summary-lines {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
}

.hb-booking-form__summary-lines li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
    color: #222222;
}

.hb-booking-form__summary-lines li span:first-child {
    text-decoration: underline;
}

.hb-booking-form__summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    color: #222222;
    border-top: 1px solid #dddddd;
    padding-top: 16px;
}

.hb-booking-form__errors {
    margin-top: 16px;
    padding: 12px;
    background: #FEE2E2;
    color: #991B1B;
    border-radius: 8px;
    font-size: 14px;
}

/* Flatpickr overrides for premium feel */
.flatpickr-calendar {
    border: none !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
    border-radius: 16px !important;
    padding: 12px !important;
}
.flatpickr-day.selected {
    background: #222222 !important;
    border-color: #222222 !important;
}
.flatpickr-day.inRange {
    background: #f7f7f7 !important;
    border-color: #f7f7f7 !important;
    box-shadow: none !important;
}
.flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.endRange.nextMonthDay {
    background: #222222 !important;
    border-color: #222222 !important;
    color: #fff !important;
}

/* Search Form Styles */
.hb-search-wrapper {
    margin-bottom: 40px;
}
.hb-search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    background: #ffffff;
    padding: 16px;
    border-radius: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #dddddd;
}
.hb-search-form__field {
    flex: 1;
    min-width: 150px;
}
.hb-search-form__field label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #222222;
    margin-bottom: 4px;
    padding-left: 12px;
}
.hb-search-form__field input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 14px;
    color: #222222;
    outline: none;
}
.hb-search-form__submit {
    background: linear-gradient(to right, #E61E4D 0%, #E31C5F 50%, #D70466 100%);
    color: white;
    border: none;
    border-radius: 24px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s;
}
.hb-search-form__submit:active {
    transform: scale(0.96);
}

/* Search Results Grid */
.hb-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}
.hb-property-card {
    text-decoration: none;
    color: #222222;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hb-property-card:hover {
    color: #222222;
}
.hb-property-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
}
.hb-property-card__favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    color: white;
    font-size: 24px;
}
.hb-property-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.hb-property-card__header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.hb-property-card__meta {
    font-size: 14px;
    color: #717171;
}
.hb-property-card__price {
    font-size: 14px;
}

/* ========== HB Booking Widget ========== */
.hb-booking-widget {
  --hb-primary: #2563eb;
  font-family: inherit;
  max-width: 480px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.hb-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hb-cal-prev, .hb-cal-next {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #374151;
}
.hb-cal-title {
  font-weight: 600;
  font-size: 15px;
}
.hb-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}
.hb-day-header {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  padding: 4px 0;
}
.hb-day {
  aspect-ratio: 1;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #111827;
  transition: background 0.15s, color 0.15s;
}
.hb-day:hover:not(:disabled) { background: #eff6ff; }
.hb-day--today { font-weight: 700; color: var(--hb-primary); }
.hb-day--past, .hb-day:disabled { color: #d1d5db; cursor: not-allowed; }
.hb-day--booked { background: #fee2e2; color: #ef4444; cursor: not-allowed; }
.hb-day--pending { background: #fef9c3; color: #b45309; cursor: not-allowed; }
.hb-day--blocked { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }
.hb-day--checkin, .hb-day--checkout {
  background: var(--hb-primary) !important;
  color: #fff !important;
  font-weight: 600;
}
.hb-day--in-range { background: #dbeafe; color: var(--hb-primary); }
.hb-dates-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.hb-date-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6b7280;
  margin-bottom: 4px;
}
.hb-date-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  background: #f9fafb;
  cursor: pointer;
}
.hb-guests-section { margin-bottom: 16px; }
.hb-guests-section > label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #6b7280;
  margin-bottom: 8px;
}
.hb-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.hb-guest-label { font-size: 14px; color: #374151; }
.hb-guest-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hb-guest-minus, .hb-guest-plus {
  width: 28px; height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--hb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hb-guest-count { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }
.hb-price-preview {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  background: #f0f9ff;
  border-radius: 8px;
  margin-bottom: 16px;
}
.hb-price-label { font-size: 13px; color: #0369a1; }
.hb-price-amount { font-size: 15px; font-weight: 700; color: var(--hb-primary); }
.hb-book-btn {
  width: 100%;
  padding: 12px;
  background: var(--hb-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.hb-book-btn:disabled { opacity: .4; cursor: not-allowed; }
.hb-book-btn:hover:not(:disabled) { opacity: .9; }
.hb-widget-messages {
  margin-top: 10px;
  font-size: 13px;
  color: #dc2626;
  min-height: 18px;
}
