/*
 * Hotel Booking – Public Stylesheet
 * Scope: All shortcode widgets rendered on the front end.
 */

/* ─────────────────────────────────────────────────────────
   Design tokens
   ───────────────────────────────────────────────────────── */
:root {
  --hb-font:           'Inter', system-ui, sans-serif;

  /* Palette */
  --hb-primary:        #2563EB;
  --hb-primary-dark:   #1D4ED8;
  --hb-primary-light:  #DBEAFE;
  --hb-accent:         #7C3AED;
  --hb-success:        #16A34A;
  --hb-danger:         #DC2626;
  --hb-warn:           #D97706;

  /* Neutrals */
  --hb-bg:             #F8FAFC;
  --hb-surface:        #FFFFFF;
  --hb-border:         #E2E8F0;
  --hb-text:           #1E293B;
  --hb-text-muted:     #64748B;

  /* Calendar colours */
  --hb-cal-available:  #D6E8D0;
  --hb-cal-almost:     #F5E6C0;
  --hb-cal-booked:     #E8D8BC;

  /* Sizing */
  --hb-radius:         12px;
  --hb-radius-sm:      8px;
  --hb-shadow:         0 4px 24px rgba(0,0,0,.08);
  --hb-shadow-hover:   0 8px 40px rgba(0,0,0,.14);
  --hb-transition:     .22s cubic-bezier(.4,0,.2,1);
}

/* ─────────────────────────────────────────────────────────
   Base widget shell
   ───────────────────────────────────────────────────────── */
.hb-widget {
  font-family: var(--hb-font);
  color: var(--hb-text);
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  padding: 32px;
  box-shadow: var(--hb-shadow);
  margin: 24px 0;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1240px;
  width: 100%;
}

.hb-widget__header {
  margin-bottom: 24px;
  text-align: center;
}

.hb-widget__title, .hb-prices-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

.hb-widget__subtitle, .hb-prices-subtitle {
    font-size: 13px;
    color: #777;
    font-weight: 300;
    text-align: center;
    margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────
   Spinner / loading
   ───────────────────────────────────────────────────────── */
.hb-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--hb-text-muted);
}

.hb-spinner__inner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--hb-border);
  border-top-color: var(--hb-primary);
  border-radius: 50%;
  animation: hb-spin .8s linear infinite;
}

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

/* ──────────────────────────────────────────────────────────────────────────
   5. Room Result Cards
   ────────────────────────────────────────────────────────────────────────── */
.hb-room-card {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 120px;
    border: 1px solid #E5DFD5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    cursor: pointer;
    background: #fff;
    padding: 12px 0;
}

.hb-room-card:hover {
    border-color: #C9A96E;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

/* Left: neutral gray thumbnail */
.hb-rc-container{
  display: flex;
  justify-content: center;
  align-items: center;
}
.hb-rc-thumb {
    width: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.hb-rc-thumb__box {
    width: 80px;
    height: 80px;
    background: #f0ece4;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.hb-rc-thumb__icon {
    width: 26px;
    height: 26px;
    color: #999;
    stroke: #999;
}

.hb-rc-thumb__label {
    font-size: 10px;
    color: #aaa;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Middle: info */
.hb-rc-info {
    flex: 1;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.hb-rc-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 2px;
}

.hb-rc-features {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Blue badge for room count */
.hb-rc-count-badge {
    font-size: 10px;
    color: #aaa;
    font-weight: 300;
    margin-bottom: 3px;
}

/* Availability */
.hb-room-card__avail {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.hb-room-card__avail--ok   { color: #2E7D32; }
.hb-room-card__avail--warn { color: #E65100; }

/* Right: price */
.hb-rc-pricing {
    width: 130px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 0 20px 0 12px;
    gap: 1px;
}

.hb-rc-price-amount {
    font-size: 22px;
    font-weight: 700;
    color: #B8954F;
    margin-bottom: 2px;
}

.hb-rc-price-label {
    font-size: 10px;
    color: #AAA;
    font-weight: 300;
}

.hb-rc-total-line {
    font-size: 12px;
    color: #333;
    font-weight: 600;
    margin-top: 2px;
}

/* ──────────────────────────────────────────────────────────────────────────
   5. Months Pricing Table
   ────────────────────────────────────────────────────────────────────────── */
.hb-prices-container {
    max-width: 1000px;
    margin: 60px auto;
    text-align: center;
    font-family: 'Inter', sans-serif;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hb-prices-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.hb-prices-subtitle {
    font-size: 16px;
    color: #888;
    margin-bottom: 40px;
}

.hb-prices-filter {
     display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #777;
    width: 200px;
}

.hb-prices-filter label {
    font-size: 15px;
    color: #666;
}

.hb-month-dropdown {
    padding: 6px 24px 6px 10px;
    border: 1px solid #E5DFD5;
    font-size: 12px;
    font-family: 'Lato', sans-serif;
}
table.hb-prices-table {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    border-collapse: collapse;
    border: none !important;
}

.hb-prices-table th {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #777;
    padding: 8px 12px;
    text-align: center;
    border-bottom: 2px solid #2C2C2C;
}

.hb-prices-table td {
    font-size: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #EDE8E0;
    text-align: center;
}

.hb-td-date {
    font-weight: 700;
    color: #1a1a1a;
    text-align: left;
    width: 20%;
}

.hb-prices-footer-note {
    font-size: 13px;
    color: #999;
    margin-top: 30px;
    font-style: italic;
}

/* Loader for table switching */
#hb-prices-wrapper {
    position: relative;
    transition: opacity 0.3s ease;
    width: 100%;
    max-width: 750px;
}

/* Responsive */
@media (max-width: 768px) {
    .hb-prices-table th, .hb-prices-table td {
        font-size: 13px;
        padding: 12px 5px;
    }
    .hb-prices-title {
        font-size: 28px;
    }
}

/* ─────────────────────────────────────────────────────────
   Legend
   ───────────────────────────────────────────────────────── */
.hb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 24px 0;
}

.hb-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #777;
}

.hb-legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Availability Calendar – nav + grid
   ───────────────────────────────────────────────────────────────────────────── */

/* Nav bar: ◄  May 2026  ► */
.hb-calendar-container{
  width: 315px;
  border: 1px solid #E5DFD5;
  padding: 14px;
  background: white;
}
.hb-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 16px;
  margin-bottom: 14px;
}

.hb-cal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hb-text);
  letter-spacing: .01em;
}

.hb-cal-arrow {
  background-color: white;
  border: 1.5px solid #E5DFD5;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .75rem;
  color: var(--hb-text-muted);
  transition: all var(--hb-transition);
}
/* Grid wrapper */
.hb-cal-grid {
  overflow-x: auto;
}

/* Day-name header row: M T W T F S S */
.hb-cal-day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.hb-cal-day-name {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--hb-text-muted);
  padding: 2px 0;
}

/* Day cells container */
.hb-cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

/* Individual day cell */
.hb-cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: .82rem;
  font-weight: 500;
  cursor: default;
  transition: transform var(--hb-transition), box-shadow var(--hb-transition);
  min-width: 32px;
  position: relative;
}

.hb-cal-num { pointer-events: none; }

.hb-cal-cell:hover:not(.hb-cal-cell--empty):not(.hb-cal-cell--past) {
  transform: scale(1.12);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 1;
}

.hb-cal-cell--empty {
  background: transparent;
}

.hb-cal-cell--past {
  background: #F1F5F9;
  color: #94A3B8;
}

.hb-cal-cell--past .hb-cal-num {
  text-decoration: line-through;
  opacity: .7;
}

.hb-cal-cell--available {
  background: var(--hb-cal-available);
  color: #1a4d1d;
}

.hb-cal-cell--almost {
  background: var(--hb-cal-almost);
  color: #5c4008;
}

.hb-cal-cell--booked {
  background: var(--hb-cal-booked);
  color: #5c3a08;
}

/* ─────────────────────────────────────────────────────────
   Month filter tabs (Room Prices)
   ───────────────────────────────────────────────────────── */
.hb-month-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
  justify-content: center;
}

.hb-month-tab {
  padding: 6px 14px;
  border: 1px solid var(--hb-border);
  border-radius: 20px;
  background: var(--hb-bg);
  color: var(--hb-text-muted);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--hb-transition);
  font-family: var(--hb-font);
}

.hb-month-tab:hover,
.hb-month-tab--active {
  background: var(--hb-primary);
  border-color: var(--hb-primary);
  color: #fff;
}

.hb-season-badge {
  text-align: center;
  display: inline-block;
  width: 100%;
  margin-bottom: 20px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--hb-primary);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────
   Price cards
   ───────────────────────────────────────────────────────── */
.hb-prices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.hb-price-card {
  background: var(--hb-bg);
  border: 1px solid var(--hb-border);
  border-radius: var(--hb-radius);
  padding: 24px;
  transition: box-shadow var(--hb-transition), transform var(--hb-transition);
}

.hb-price-card:hover {
  box-shadow: var(--hb-shadow-hover);
  transform: translateY(-3px);
}

.hb-price-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 8px;
}

.hb-price-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.hb-price-card__capacity {
  font-size: .75rem;
  background: var(--hb-primary-light);
  color: var(--hb-primary-dark);
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
  font-weight: 500;
}

.hb-price-card__price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 16px;
}

.hb-price-currency {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--hb-primary);
}

.hb-price-amount {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--hb-primary);
}

.hb-price-per-night {
  font-size: .8rem;
  color: var(--hb-text-muted);
  margin-left: 4px;
}

.hb-price-card__amenities {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hb-price-card__amenities li {
  font-size: .75rem;
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--hb-text-muted);
}

.hb-price-card__desc {
  font-size: .8rem;
  color: var(--hb-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   Search form
   ───────────────────────────────────────────────────────── */
.hb-search-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hb-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.hb-form-row--wrap {
  flex-wrap: wrap;
}

.hb-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hb-form-group--half {
  flex: 1 1 calc(50% - 8px);
  min-width: 200px;
}

.hb-label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--hb-text);
}

.hb-required {
  color: var(--hb-danger);
}

.hb-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--hb-border);
  border-radius: var(--hb-radius-sm);
  font-family: var(--hb-font);
  font-size: .9rem;
  color: var(--hb-text);
  background: var(--hb-bg);
  transition: border-color var(--hb-transition), box-shadow var(--hb-transition);
  box-sizing: border-box;
}

.hb-input:focus {
  outline: none;
  border-color: var(--hb-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.hb-select { cursor: pointer; }

/* ─────────────────────────────────────────────────────────
   Buttons
   ───────────────────────────────────────────────────────── */
.hb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--hb-radius-sm);
  font-family: var(--hb-font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--hb-transition);
  text-decoration: none;
}

.hb-btn__icon {
  width: 18px;
  height: 18px;
}

.hb-btn--primary {
  background: linear-gradient(135deg, var(--hb-primary), var(--hb-accent));
  color: #fff;
  border-color: transparent;
}

.hb-btn--primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(37,99,235,.4);
  transform: translateY(-1px);
}

.hb-btn--large {
  padding: 14px 32px;
  font-size: 1rem;
}

.hb-btn--outline {
  background: transparent;
  border-color: var(--hb-primary);
  color: var(--hb-primary);
}

.hb-btn--outline:hover {
  background: var(--hb-primary-light);
}

.hb-btn--ghost {
  background: transparent;
  color: var(--hb-text-muted);
  border: none;
  padding: 8px 0;
}

.hb-btn--ghost:hover {
  color: var(--hb-primary);
}

.hb-btn--back {
  font-size: .875rem;
}

.hb-btn:disabled,
.hb-btn[disabled] {
  opacity: .65;
  cursor: not-allowed;
  transform: none !important;
}

/* ─────────────────────────────────────────────────────────
   Form error
   ───────────────────────────────────────────────────────── */
.hb-form-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--hb-danger);
  border-radius: var(--hb-radius-sm);
  padding: 12px 16px;
  font-size: .875rem;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────
   Results header
   ───────────────────────────────────────────────────────── */
.hb-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.hb-results-meta {
  font-size: .875rem;
  color: var(--hb-text-muted);
  margin: 0;
}

/* ─────────────────────────────────────────────────────────
   Room result cards
   ───────────────────────────────────────────────────────── */


.hb-room-card {
  background-color: white;
  border: 1px solid #E5DFD5;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.hb-room-card:hover,
.hb-room-card--selected {
  border-color: #C9A96E;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.hb-room-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.hb-room-card__type {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.hb-room-card__capacity {
  font-size: .75rem;
  background: var(--hb-primary-light);
  color: var(--hb-primary-dark);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.hb-room-card__desc {
  font-size: .85rem;
  color: var(--hb-text-muted);
  line-height: 1.5;
  margin: 0;
}

.hb-room-card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hb-room-card__amenities li {
  font-size: .72rem;
  background: var(--hb-surface);
  border: 1px solid var(--hb-border);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--hb-text-muted);
}

.hb-room-card__pricing {
  border-top: 1px solid var(--hb-border);
  padding-top: 12px;
}

.hb-room-card__price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.hb-room-card__nightly {
  font-size: .875rem;
  color: var(--hb-text-muted);
}

.hb-room-card__nightly strong {
  color: var(--hb-primary);
  font-size: 1rem;
}

.hb-room-card__total {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--hb-primary);
}

.hb-room-card__total small {
  font-size: .75rem;
  font-weight: 400;
  color: var(--hb-text-muted);
}

.hb-room-card__select-btn {
  width: 100%;
  margin-top: 4px;
}

/* No results message */
.hb-no-results {
  text-align: center;
  padding: 48px 16px;
  color: var(--hb-text-muted);
  grid-column: 1 / -1;
}

.hb-no-results__icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

/* ─────────────────────────────────────────────────────────
   Booking summary box
   ───────────────────────────────────────────────────────── */
.hb-booking-summary {
  background: var(--hb-primary-light);
  border: 1px solid #BFDBFE;
  border-radius: var(--hb-radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: .875rem;
}

.hb-booking-summary strong {
  color: var(--hb-primary-dark);
}

.hb-booking-summary__row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.hb-booking-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────
   Confirmation screen
   ───────────────────────────────────────────────────────── */
.hb-confirmation {
  text-align: center;
  padding: 48px 16px;
}

.hb-confirmation__icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--hb-success), #4ade80);
  color: #fff;
  font-size: 2.5rem;
  line-height: 72px;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: hb-pop .4s cubic-bezier(.34,1.56,.64,1);
}

@keyframes hb-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.hb-confirmation__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--hb-success);
}

.hb-confirmation__msg {
  color: var(--hb-text-muted);
  margin: 0 0 28px;
}

/* ─────────────────────────────────────────────────────────
   Booking form
   ───────────────────────────────────────────────────────── */
.hb-booking-form .hb-form-row--wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ─────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hb-widget { padding: 20px 16px; }
  .hb-form-group--half { flex: 1 1 100%; }
  .hb-widget__title { font-size: 1.4rem; }
}
