/* ===========================================================
   ThinkHaus Frontend Styles
   =========================================================== */

.hbs-modal-overlay {
  position: relative;
  background: #eeede5;
  padding: 0;
  display: block;
  color: #281d18;
}
.hbs-modal {
  /* background: #ffffff;
  max-width: 800px; */
  margin: 0 auto;
  /* padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e2e2; */
}
.hbs-form-heading {
  font-family: "NeutraText", sans-serif !important;
  font-size: 27px;
  font-weight: 500 !important;
  line-height: 33px;
  color: #281d18;
  margin: 0px;
  margin-bottom: 15px;
}
.hbs-price-tag {
  font-size: 16px;
  font-weight: 500;
  color: #e8521e;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}
.hbs-locked-info-bar {
  font-family: "NeutraText", sans-serif !important;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 500;
  line-height: 23px;
  color: #281d18;
  display: flex;
  flex-direction: column;
}
.hbs-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hbs-field-full {
  grid-column: 1 / -1;
}
.hbs-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hbs-field label {
  font-size: 14px;
  font-weight: 600;
  color: #50575e;
}
.hbs-field input[type="text"],
.hbs-field input[type="tel"],
.hbs-field input[type="email"],
.hbs-field input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: #1d2327;
  background-color: #f9f9f9;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.hbs-field input:focus {
  border-color: #e8521e;
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(232, 82, 30, 0.1);
}
.hbs-select-wrap {
  position: relative;
}
.hbs-select-wrap select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: #1d2327;
  background-color: #f9f9f9;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2350575e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.hbs-select-wrap select:focus {
  border-color: #e8521e;
  background-color: #fff;
  box-shadow: 0 0 0 2px rgba(232, 82, 30, 0.1);
}
.hbs-display-type {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* ============================================================
   DATE FIELD TRIGGER
   ============================================================ */
.hbs-date-field {
  position: relative;
}
.hbs-date-field input[type="text"] {
  cursor: pointer;
  padding-right: 45px;
}
.hbs-date-icon {
  position: absolute;
  left: auto;
  right: 12px;
  top: 10px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e8521e, #d44415);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(232, 82, 30, 0.3);
}

/* ============================================================
   CALENDAR POPOVER — Lives on <body>, positioned via JS
   ============================================================ */
.hbs-calendar-popover {
  display: none;
  position: fixed;
  width: 300px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  z-index: 99999999;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.hbs-calendar-popover.is-open {
  display: block !important;
}

/* Header row */
.hbs-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hbs-cal-title {
  font-weight: 700;
  font-size: 15px;
  color: #1f1f1f;
}
.hbs-cal-nav-btn {
  background: #f5f3ed;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #444;
  transition: background 0.15s;
}
.hbs-cal-nav-btn:hover {
  background: #ebe8e0;
}

/* Day-of-week headers */
.hbs-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.hbs-cal-dow {
  font-size: 10px;
  font-weight: 800;
  color: #aaa;
  padding: 6px 0;
  text-transform: uppercase;
}
.hbs-cal-dow.is-weekend {
  color: #e8521e;
}

/* ============================================================
   DAY CELLS — <div> based, not <button>
   ============================================================ */
#hbs-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.hbs-cal-day {
  position: relative;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  color: #1d2327;
  transition:
    background 0.15s,
    color 0.15s,
    box-shadow 0.15s;
  user-select: none;
  -webkit-user-select: none;
}
.hbs-cal-day:hover:not(.is-empty):not(.is-disabled) {
  background: #f6f7f7;
}

/* Weekend tint */
.hbs-cal-day.is-weekend {
  color: #e8521e;
}
.hbs-cal-day.is-weekend:hover:not(.is-disabled) {
  background: #fef0eb;
}

/* Selected */
.hbs-cal-day.is-selected {
  background: #e8521e !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(232, 82, 30, 0.3);
}

/* Disabled — past dates & fully booked */
.hbs-cal-day.is-disabled {
  color: #c3c4c7;
  cursor: not-allowed;
  text-decoration: line-through;
  background: transparent;
}
.hbs-cal-day.is-disabled:hover {
  background: transparent;
}

/* Limited — available but low */
.hbs-cal-day.is-limited {
  color: #1d2327;
}

/* Empty leading cells */
.hbs-cal-day.is-empty {
  cursor: default;
}

/* Status dots */
.hbs-dot {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.hbs-dot-limited {
  background: #3b82f6;
}
.hbs-dot-full {
  background: #ef4444;
}

/* Dot turns white on selected for visibility */
.hbs-cal-day.is-selected .hbs-dot {
  background: rgba(255, 255, 255, 0.7) !important;
}

/* Calendar loading state */
.hbs-cal-loading {
  text-align: center;
  padding: 40px 0;
  color: #757575;
  font-size: 14px;
  grid-column: 1 / -1;
}

/* ============================================================
   MOBILE MODAL — inline-styled by JS, only a few overrides
   ============================================================ */
.hbs-mm-day {
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   FORM FOOTER & SUBMIT
   ============================================================ */
.hbs-form-footer {
  margin-top: 0px;
  padding-top: 22px;
  border-top: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0px;
}
.hbs-form-message {
  font-size: 14px;
  font-weight: 500;
}
.hbs-form-message.is-error {
  color: #c0392b;
}
.hbs-form-message.is-success {
  color: #1c7a3d;
}
.hbs-submit-btn {
  background: #e8521e;
  color: #ffffff;
  border: none;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hbs-submit-btn:hover {
  background: #d04818;
}
.hbs-submit-btn:disabled {
  background: #9aa0a6;
  cursor: not-allowed;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .hbs-modal {
    padding: 0px;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .hbs-form-grid {
    grid-template-columns: 1fr;
  }
  /* Popover width no longer needs responsive override —
     mobile uses the full-screen modal instead.
     But if somehow the desktop popover shows on a small screen: */
  .hbs-calendar-popover {
    width: calc(100vw - 24px);
    left: 12px !important;
  }
}
