:root {
  /* Default Theme Colors (Server Defaults) */
  --hbs-primary: #0f172a;
  /* Slate 900 */
  --hbs-primary-hover: #020617;
  /* Darker Slate */
  --hbs-accent: #3b82f6;
  /* Blue 500 */
  --hbs-card-bg: #ffffff;
  --hbs-text: #334155;
  /* Slate 700 */

  /* Floating Form Defaults */
  --hbs-float-bg: #ffffff;
  --hbs-float-text: #0f172a;
  --hbs-float-btn: #0f172a;
  --hbs-float-btn-hover: #020617;
}

/* ==== Formulario de Reservación ==== */
.hbs-form {
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  background: var(--hbs-card-bg);
  color: var(--hbs-text);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.hbs-header {
  text-align: center;
  margin-bottom: 30px;
}

.hbs-form h3 {
  margin: 0 0 10px;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--hbs-primary);
}

.hbs-subtitle {
  font-size: 1.5rem;
  color: #64748b;
  margin: 0;
}

.hbs-info-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 16px;
}

.hbs-info-note .hbs-info-icon {
  flex-shrink: 0;
  color: #0284c7;
  margin-top: 2px;
}

.hbs-info-note p {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #0369a1;
}

.hbs-notices {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

.hbs-notice-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-weight: 600;
}

.hbs-section-title {
  font-size: 1.5rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 5px;
}

.hbs-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.hbs-grid-2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 600px) {
  .hbs-grid-2 {
    grid-template-columns: 1fr;
  }
}

.hbs-field {
  display: flex;
  flex-direction: column;
}

.hbs-field label {
  margin-bottom: 6px;
  font-size: 1.5rem;
  font-weight: 600;
}

/* General Input Styles */
.hbs-form input[type="text"],
.hbs-form input[type="email"],
.hbs-form input[type="tel"],
.hbs-form input[type="number"],
.hbs-form input[type="date"],
.hbs-form input[type="url"],
.hbs-form textarea,
.hbs-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1.5rem;
  color: #1e293b;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.hbs-form input[type="checkbox"],
.hbs-form input[type="radio"] {
  margin-right: 6px;
}

.hbs-form button[type="submit"] {
  display: inline-block;
  background: var(--hbs-accent);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hbs-form button[type="submit"]:hover {
  background: var(--hbs-primary-hover);
}

/* Room Type Selector (Horizontal Pills) */
.hbs-room-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.hbs-room-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  /* Pill shape */
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
}

.hbs-room-card:hover {
  border-color: var(--hbs-accent);
  background: #f8fafc;
}

/* Hide actual radio */
.hbs-room-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Checked State */
.hbs-room-card:has(.hbs-room-radio:checked) {
  border-color: var(--hbs-accent);
  background: #eff6ff;
  /* Light Blue */
  box-shadow: 0 0 0 1px var(--hbs-accent);
}

.hbs-room-radio:checked~.hbs-room-content .hbs-room-title {
  color: var(--hbs-accent);
}

.hbs-room-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hbs-room-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #1e293b;
  line-height: 1.2;
}

.hbs-room-desc {
  font-size: 1.5rem;
  color: #64748b;
  margin-top: 2px;
}

/* Hide the old checkmark circle for pill design */
.hbs-check-mark {
  display: none;
}

.hbs-hint {
  font-size: 1.5rem;
  color: #d97706;
  /* Amber 600 */
  margin-bottom: 20px;
  min-height: 1.3em;
}

/* Footer Actions */
.hbs-footer-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.hbs-checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
  color: var(--hbs-text);
  cursor: pointer;
}

.hbs-checkbox-wrapper input {
  margin-right: 10px;
  width: 18px;
  height: 18px;
}

.hbs-link {
  color: var(--hbs-accent);
  text-decoration: underline;
}

.hbs-link:hover {
  text-decoration: none;
}

/* Buttons */
.hbs-btn-primary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--hbs-primary);
  color: #000000;
  font-size: 1.5rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

.hbs-btn-primary:hover {
  background: var(--hbs-primary-hover);
}

.hbs-btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Price Breakdown Table inside form */
.hbs-price-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.hbs-breakdown {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.5rem;
}

.hbs-breakdown td,
.hbs-breakdown th {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.hbs-breakdown tr:last-child th,
.hbs-breakdown tr:last-child td {
  border-bottom: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  padding-top: 12px;
}

.hbs-breakdown th {
  text-align: left;
  font-weight: normal;
  color: #64748b;
}

.hbs-breakdown td {
  text-align: right;
  font-weight: 600;
}

/* ==== Messages ==== */
#hbs-form-message {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  font-size: 1.5rem;
  display: none;
  /* hidden by default */
}

#hbs-form-message.success {
  display: block;
  background: #dcfce7;
  /* Green 100 */
  color: #166534;
  /* Green 800 */
  border: 1px solid #bbf7d0;
}

#hbs-form-message.error {
  display: block;
  background: #fee2e2;
  /* Red 100 */
  color: #991b1b;
  /* Red 800 */
  border: 1px solid #fecaca;
}

/* ==== Floating Form (Desktop) ==== */
#hbs-floating-form {
  display: none;
  /* Hidden on mobile */
}

@media (min-width: 1024px) {
  #hbs-floating-form {
    display: block;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    max-width: auto;
    padding: 15px 25px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
  }

  /* Center the form content */
  #hbs-floating-form form {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }

  /* Label Styling in Floating Form */
  #hbs-floating-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--hbs-text);
  }

  #hbs-floating-form label span {
    margin-left: 2px;
  }

  /* Specific Widths for inputs in floating form */
  #hbs-floating-form input[name="check_in_date"] {
    width: auto;
  }

  #hbs-floating-form input[name="nights"],
  #hbs-floating-form input[name="adults"],
  #hbs-floating-form input[name="kids"] {
    width: 50px;
    text-align: center;
  }

  /* Button Styling in Floating Form */
  #hbs-floating-form button {
    background: var(--hbs-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.5rem;
    height: 42px;
    /* Match input wrapper height approx */
    margin-top: 18px;
    /* Align with inputs */
    transition: background 0.2s ease, transform 0.1s ease;
  }

  #hbs-floating-form button:hover {
    background: var(--hbs-primary);
    transform: translateY(-1px);
  }

  /* Make floating form inputs more compact */
  #hbs-floating-form .hbs-input-wrapper input {
    padding: 4px 0 !important;
    font-size: 1.5rem;
  }
}

/* GLOBAL SHARED STYLES FOR INPUT WRAPPERS (Main + Floating) */

/* Input Wrapper (The "Box") */
.hbs-input-wrapper,
.hbs-phone-wrapper {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  /* Slate 100 */
  border: 1px solid #cbd5e1;
  /* Slate 300 */
  border-radius: 6px;
  padding: 0 8px;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.hbs-input-wrapper:focus-within,
.hbs-phone-wrapper:focus-within {
  border-color: var(--hbs-accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Icon Style */
.hbs-icon {
  color: #64748b;
  /* Slate 500 */
  flex-shrink: 0;
  margin-right: 6px;
}

/* Reset inputs inside wrappers to look like they are part of the box */
.hbs-input-wrapper input,
.hbs-phone-wrapper input,
.hbs-phone-wrapper select {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 8px 0 !important;
  margin: 0 !important;
  font-size: 1.5rem;
  color: var(--hbs-text);
  outline: none;
  flex: 1;
  /* Allow input to fill space */
  width: auto;
  /* Override 100% */
  min-width: 0;
  /* Fix flex overflow */
}

/* Specific adjustments for phone wrapper */
.hbs-phone-wrapper select.hbs-country-select {
  width: auto;
  padding-right: 20px !important;
  border-right: 1px solid #cbd5e1 !important;
  border-radius: 0 !important;
  margin-right: 8px !important;
  color: #475569;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

/* Hide native date icon (prevent duplicate) */
input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
}

/* Hide number input arrows/spinners */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  /* Firefox */
}

input[type="date"] {
  position: relative;
  font-family: inherit;
}

/* ==== Loading Overlay ==== */
.hbs-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hbs-fadeIn 0.2s ease-in-out;
}

.hbs-loading-content {
  background: var(--hbs-card-bg);
  padding: 40px 60px;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  text-align: center;
  animation: hbs-slideUp 0.3s ease-out;
}

.hbs-dots-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.hbs-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hbs-accent);
  animation: hbs-dotBounce 1.4s infinite ease-in-out both;
}

.hbs-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.hbs-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.hbs-loading-text {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--hbs-text);
}

/* Animations */
@keyframes hbs-fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes hbs-slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes hbs-dotBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 640px) {
  .hbs-loading-content {
    padding: 30px 40px;
  }

  .hbs-loading-text {
    font-size: 14px;
  }

  .hbs-dot {
    width: 10px;
    height: 10px;
  }
}