/* ============================================
   Hotel Reservation — Frontend Booking Form v1.3
   Modern style with modal window + preview card
   Light theme with admin-configurable colors, micro-animations, responsive
   ============================================ */

/* Shared block spacing class (also defined in rooms-block.css, room-comparison.css). */
.hr-block-spacing {
  margin-top: 5rem;
  margin-bottom: 5rem;
}

/* ---------- Preview Card ---------- */
.hr-booking-preview-wrapper {
  display: flex;
  justify-content: center;
}

/* Mobile opener for inline mode. Hidden until JS converts the form. */
.hr-booking-preview-wrapper--mobile {
  display: none;
}

.hr-booking-preview-wrapper--mobile.is-visible {
  display: flex;
}

.hr-booking-preview {
  background: var(--hr-bg, #ffffff);
  border: 1.5px solid var(--hr-border, #e5e7eb);
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  animation: hr-fadeIn 0.4s ease;
}

.hr-booking-preview__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--hr-text, #1a1a2e);
  letter-spacing: -0.02em;
}

.hr-booking-preview__desc {
  font-size: 14px;
  color: var(--hr-text-secondary, #6b7280);
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.hr-booking-preview__btn {
  max-width: 280px;
  margin: 0 auto;
}

/* ---------- Modal Overlay ---------- */
.hr-booking-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100002;
  background: rgba(0, 0, 0, 0.5);
  display: none !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

.hr-booking-modal-overlay.hr-modal-visible {
  display: flex !important;
  animation: hr-fadeInOverlay 0.2s ease;
}

@keyframes hr-fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Modal Container ---------- */
.hr-booking-modal {
  position: relative;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  animation: hr-modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 720px) {
  .hr-booking-modal {
    max-width: 700px;
  }
}

@keyframes hr-modalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Modal Close Button ---------- */
.hr-booking-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--hr-text, #1a1a2e);
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: transform 0.15s, opacity 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hr-booking-modal__close:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

.hr-booking-modal__close:active {
  transform: scale(0.95);
}

/* Modal: make the form inside look good */
.hr-booking-modal .hr-booking-form {
  max-width: 100%;
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

/* ---------- CSS Custom Properties ---------- */
:root {
  --hr-primary: #d97706;
  --hr-primary-dark: #b45309;
  --hr-primary-light: #fbbf24;
  --hr-primary-bg: #fffbeb;
  --hr-primary-border: #fde68a;
  --hr-text: #1a1a2e;
  --hr-text-secondary: #6b7280;
  --hr-text-muted: #9ca3af;
  --hr-bg: #ffffff;
  --hr-bg-alt: #fafafa;
  --hr-bg-hover: #f3f4f6;
  --hr-border: #e5e7eb;
  --hr-border-focus: #d97706;
  --hr-shadow: rgba(0, 0, 0, 0.08);
  --hr-shadow-lg: rgba(0, 0, 0, 0.12);
  --hr-success: #059669;
  --hr-success-bg: #d1fae5;
  --hr-danger: #dc2626;
  --hr-danger-bg: #fef2f2;
  --hr-danger-border: #fecaca;
  --hr-radius: 12px;
  --hr-radius-sm: 8px;
  --hr-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode — removed: form always uses admin-configured colors */

/* ============================================
   Main Form Container
   ============================================ */
.hr-booking-form {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  max-width: 480px;
  margin: 0 auto;
  background: var(--hr-bg);
  border-radius: 16px;
  box-shadow: 0 4px 24px var(--hr-shadow), 0 1px 3px var(--hr-shadow);
  padding: 28px 24px;
  color: var(--hr-text);
  animation: hr-fadeIn 0.4s ease;
  position: relative;
  overflow-x: hidden;
}

/* Decorative top bar */
.hr-booking-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--hr-primary), var(--hr-primary-light), var(--hr-primary));
  background-size: 200% 100%;
  animation: hr-shimmer 3s ease infinite;
}

@keyframes hr-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hr-booking-form * {
  box-sizing: border-box;
}

/* ---------- Header ---------- */
.hr-booking-form__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px 0;
  text-align: center;
  color: var(--hr-text);
  letter-spacing: -0.02em;
}

.hr-booking-form__subtitle {
  font-size: 14px;
  color: var(--hr-text-secondary);
  text-align: center;
  margin: 0 0 20px 0;
}

/* ---------- Form Group ---------- */
.hr-form-group {
  margin-bottom: 16px;
}

.hr-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--hr-text);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.hr-form-row {
  display: flex;
  gap: 12px;
}

.hr-form-row .hr-form-group {
  flex: 1;
  min-width: 0;
}

.hr-form-row--column {
  flex-direction: column;
  gap: 0;
}

/* ---------- Search step: guests + button in one row ---------- */
.hr-search-actions {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.hr-search-actions .hr-form-group {
  margin-bottom: 0;
  flex-shrink: 0;
}

.hr-search-actions .hr-search-btn {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  white-space: nowrap;
}

/* ---------- Inputs ---------- */
.hr-booking-form input[type="date"],
.hr-booking-form input[type="datetime-local"],
.hr-booking-form input[type="text"],
.hr-booking-form input[type="email"],
.hr-booking-form input[type="tel"],
.hr-booking-form input[type="number"],
.hr-booking-form select,
.hr-booking-form textarea {
  width: 100%;
  padding: 10px 14px;
  line-height: 1.5;
  border: 1.5px solid var(--hr-border);
  border-radius: var(--hr-radius-sm);
  font-size: 14px;
  color: var(--hr-text);
  background: var(--hr-bg-alt);
  transition: border-color var(--hr-transition), box-shadow var(--hr-transition), background-color var(--hr-transition);
  outline: none;
  -webkit-appearance: none;
}

.hr-booking-form input:focus,
.hr-booking-form select:focus,
.hr-booking-form textarea:focus {
  border-color: var(--hr-border-focus);
  box-shadow: 0 0 0 3px var(--hr-primary-bg);
  background: var(--hr-bg);
}

.hr-booking-form input::placeholder {
  color: var(--hr-text-muted);
}

/* Fix date/datetime input calendar icon */
.hr-booking-form input[type="date"]::-webkit-calendar-picker-indicator,
.hr-booking-form input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.hr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--hr-radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--hr-transition), transform 0.1s, box-shadow var(--hr-transition);
  width: 100%;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

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

/* Ripple effect on click */
.hr-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
  transform: scale(10);
  opacity: 0;
  transition: transform 0.4s, opacity 0.6s;
}

.hr-btn:active::after {
  transform: scale(0);
  opacity: 0.3;
  transition: 0s;
}

.hr-btn--primary {
  background: linear-gradient(135deg, var(--hr-primary), var(--hr-primary-dark));
  color: var(--hr-btn-text, #ffffff);
  box-shadow: 0 2px 8px var(--hr-primary-bg);
}

.hr-btn--primary:hover {
  background: linear-gradient(135deg, var(--hr-primary-dark), #92400e);
  filter: brightness(0.9);
  box-shadow: 0 4px 12px var(--hr-primary-border);
  transform: translateY(-1px);
}

.hr-btn--primary:disabled {
  background: var(--hr-border);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.hr-btn--secondary {
  background: var(--hr-bg-hover);
  color: var(--hr-text);
}

.hr-btn--secondary:hover {
  background: var(--hr-border);
}

.hr-btn--small {
  padding: 8px 16px;
  font-size: 13px;
}

/* ---------- Spinner ---------- */
.hr-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: hr-spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* ---------- Step Indicator ---------- */
.hr-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  gap: 0;
}

.hr-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color var(--hr-transition);
 padding: 4px 8px;
  border-radius: 6px;
  cursor: default;
}

.hr-step.active {
  color: var(--hr-primary);
}

.hr-step.completed {
  color: var(--hr-success);
  cursor: pointer;
}

.hr-step.completed:hover {
  opacity: 0.8;
}

.hr-step.completed:active {
  opacity: 0.6;
}

.hr-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--hr-bg-hover);
  color: var(--hr-text-muted);
  transition: all var(--hr-transition);
  border: 2px solid transparent;
}

.hr-step.active .hr-step-number {
  background: var(--hr-primary);
  color: #ffffff;
  border-color: var(--hr-primary);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.hr-step.completed .hr-step-number {
  background: var(--hr-success);
  color: #ffffff;
  border-color: var(--hr-success);
}

.hr-step-connector {
  width: 20px;
  height: 2px;
  background: var(--hr-border);
  margin: 0 4px;
  border-radius: 1px;
  transition: background var(--hr-transition);
}

.hr-step.completed + .hr-step-connector,
.hr-step.completed ~ .hr-step-connector {
  background: var(--hr-success);
}

/* ---------- Room Cards ---------- */
.hr-results {
  margin-top: 20px;
}

.hr-results__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--hr-text);
}

.hr-results-notice {
  background: var(--hr-primary-bg);
  border: 1px solid var(--hr-primary-border);
  border-radius: var(--hr-radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hr-text);
}

.hr-room-card {
  border: 1.5px solid var(--hr-border);
  border-radius: var(--hr-radius);
  padding: 16px;
  margin-bottom: 10px;
  transition: all var(--hr-transition);
  cursor: pointer;
  position: relative;
  background: var(--hr-bg);
}

.hr-room-card:hover {
  border-color: var(--hr-primary);
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.1);
  transform: translateY(-1px);
}

.hr-room-card.selected {
  border-color: var(--hr-primary);
  background: var(--hr-primary-bg);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

.hr-room-card.selected::before {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: var(--hr-primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  animation: hr-popIn 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes hr-popIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.hr-room-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--hr-text);
  margin: 0 0 4px 0;
}

.hr-room-card__meta {
  font-size: 12px;
  color: var(--hr-text-secondary);
  margin: 0 0 8px 0;
}

.hr-room-card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.hr-room-card__amenity {
  display: inline-block;
  padding: 2px 8px;
  background: var(--hr-bg-hover);
  border-radius: 6px;
  font-size: 11px;
  color: var(--hr-text-secondary);
  transition: background var(--hr-transition);
}

.hr-room-card__price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.hr-room-card__price > div {
  min-width: 0;
}

.hr-room-card__price-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--hr-primary);
}

.hr-room-card__price-unit {
  font-size: 12px;
  color: var(--hr-text-muted);
}

.hr-room-card__total {
  font-size: 13px;
  color: var(--hr-text-secondary);
}

.hr-room-card__total strong {
  color: var(--hr-text);
}

/* ---------- Results Carousel (step 2) ---------- */
.hr-results-carousel {
  position: relative;
  max-width: 100%;
}

.hr-results-carousel--single .hr-results-carousel__track {
  width: 100%;
}

.hr-results-carousel--single .hr-room-card {
  flex: 1 1 auto;
}

.hr-results-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  touch-action: pan-y;
  padding: 2px 40px;
}

.hr-results-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.hr-results-carousel__viewport.is-dragging {
  cursor: grabbing;
}

.hr-results-carousel__track {
  display: flex;
  gap: 10px;
  padding: 2px;
}

.hr-results-carousel .hr-room-card {
  flex: 0 0 82%;
  min-width: 0;
  margin-bottom: 0;
  user-select: none;
  -webkit-user-select: none;
}

.hr-results-carousel__nav {
  position: absolute;
  top: 50%;
  margin-top: -16px;
  width: 32px;
  height: 32px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin-bottom: 0;
  margin-left: 0;
  margin-right: 0;
  line-height: 1;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 50%;
  border: 1px solid var(--hr-border);
  background: var(--hr-bg, #fff);
  color: var(--hr-text);
  font-size: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--hr-shadow);
  z-index: 2;
}

/* Chevron drawn with a pseudo-element — always optically centered,
   immune to font glyph metrics of ‹ › characters. */
.hr-results-carousel__nav::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-top: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
}

.hr-results-carousel__nav--prev::before {
  transform: translate(-30%, -50%) rotate(-135deg);
}

.hr-results-carousel__nav--next::before {
  transform: translate(-70%, -50%) rotate(45deg);
}

.hr-results-carousel__nav:hover {
  border-color: var(--hr-primary);
  color: var(--hr-primary);
}

.hr-results-carousel__nav:focus-visible {
  outline: 2px solid var(--hr-primary);
  outline-offset: 2px;
}

.hr-results-carousel__nav--prev { left: 6px; }
.hr-results-carousel__nav--next { right: 6px; }

/* Clickable room name inside booking cards. */
.hr-room-card__name-btn {
  padding: 5px 12px;
  margin: 0 0 0 -12px;
  border: none;
  border-radius: 8px;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--hr-text);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.hr-room-card__name-btn:hover {
  background: var(--hr-primary);
  color: #fff;
  text-decoration: none;
}

/* ---------- No Results ---------- */
.hr-no-results {
  text-align: center;
  padding: 24px 16px;
  color: var(--hr-text-secondary);
  animation: hr-fadeIn 0.3s ease;
}

.hr-no-results__icon {
  font-size: 40px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.hr-no-results__text {
  font-size: 14px;
  margin: 0;
}

/* ---------- Booking Details: two columns on desktop ---------- */
.hr-book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  align-items: start;
}

.hr-book-grid__main,
.hr-book-grid__side {
  min-width: 0;
}

.hr-book-grid__side .hr-book-btn {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .hr-book-grid {
    grid-template-columns: 1fr;
  }
}

.hr-booking-details {
  animation: hr-slideUp 0.3s ease;
}

@keyframes hr-slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hr-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Price Breakdown ---------- */
.hr-price-breakdown {
  background: var(--hr-bg-alt);
  border-radius: var(--hr-radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--hr-border);
}

.hr-price-breakdown__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--hr-text);
  margin: 0 0 8px 0;
}

.hr-price-breakdown table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hr-price-breakdown th,
.hr-price-breakdown td {
  padding: 4px 0;
  text-align: left;
  color: var(--hr-text-secondary);
}

.hr-price-breakdown th:last-child,
.hr-price-breakdown td:last-child {
  text-align: right;
}

.hr-price-breakdown__total {
  border-top: 1.5px solid var(--hr-border);
  margin-top: 6px;
  padding-top: 6px;
}

.hr-price-breakdown__total td {
  font-weight: 700;
  font-size: 15px;
  color: var(--hr-text);
}

/* ---------- Terms (hover hint) ---------- */
.hr-terms {
  margin-top: 16px;
}

.hr-terms--hint {
  position: relative;
  display: inline-block;
}

.hr-terms__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  margin-bottom: 12px;
  background: none;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hr-text-secondary);
  cursor: help;
  transition: background 0.2s, color 0.2s;
}

.hr-terms__trigger:hover {
  background: var(--hr-primary);
  color: #fff;
}

.hr-terms__trigger:hover .hr-terms__q {
  background: #fff;
  color: var(--hr-primary);
}

.hr-terms__q {
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  margin: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--hr-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hr-terms__popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: max-content;
  max-width: 280px;
  padding: 12px 14px;
  background: var(--hr-text, #1a1a2e);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  border-radius: var(--hr-radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hr-terms__popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 24px;
  border: 6px solid transparent;
  border-top-color: var(--hr-text, #1a1a2e);
}

.hr-terms--hint:hover .hr-terms__popup,
.hr-terms--hint:focus-within .hr-terms__popup {
  display: block;
}

/* ---------- Success ---------- */
.hr-success {
  text-align: center;
  padding: 32px 16px;
  animation: hr-scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes hr-scaleIn {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.hr-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--hr-success-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: var(--hr-success);
}

.hr-success__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--hr-text);
  margin: 0 0 8px 0;
}

.hr-success__text {
  font-size: 14px;
  color: var(--hr-text-secondary);
  margin: 0;
}

/* ---------- Set password after booking ---------- */
.hr-success-password {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--hr-primary-border);
  border-radius: var(--hr-radius-sm);
  background: var(--hr-primary-bg);
  text-align: left;
}

.hr-success-password__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hr-text);
  margin: 0 0 4px 0;
}

.hr-success-password__text {
  font-size: 13px;
  color: var(--hr-text-secondary);
  margin: 0 0 12px 0;
}

.hr-success-password__input,
.hr-success-password__confirm {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--hr-border);
  border-radius: var(--hr-radius-sm);
  font-size: 14px;
  color: var(--hr-text);
  background: var(--hr-bg);
  outline: none;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.hr-success-password__input:focus,
.hr-success-password__confirm:focus {
  border-color: var(--hr-border-focus);
  box-shadow: 0 0 0 3px var(--hr-primary-bg);
}

.hr-success-password__done {
  font-size: 14px;
  font-weight: 600;
  color: var(--hr-success);
}

/* ---------- Redirect notice after booking ---------- */
.hr-success-redirect {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--hr-primary-border);
  border-radius: var(--hr-radius-sm);
  background: var(--hr-primary-bg);
  text-align: center;
}

.hr-success-redirect__text {
  font-size: 14px;
  color: var(--hr-text);
  margin: 0 0 12px 0;
}

.hr-redirect-count {
  font-weight: 700;
}

.hr-success-redirect__link {
  max-width: 280px;
  margin: 0 auto;
}

.hr-success-redirect__alt {
  margin: 12px 0 0 0;
  font-size: 13px;
}

/* ---------- Standalone set-password page ---------- */
.hr-set-password {
  max-width: 480px;
  margin: 40px auto;
  padding: 28px 24px;
  border: 1px solid var(--hr-border, #e5e7eb);
  border-radius: 16px;
  background: var(--hr-bg, #ffffff);
}

.hr-set-password h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
}

.hr-set-password > p {
  font-size: 14px;
  color: var(--hr-text-secondary, #6b7280);
  margin: 0 0 16px 0;
}

.hr-set-password .hr-set-password__btn {
  width: 100%;
}

/* ---------- Error ---------- */
.hr-error {
  background: var(--hr-danger-bg);
  border: 1px solid var(--hr-danger-border);
  border-radius: var(--hr-radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--hr-danger);
  animation: hr-shake 0.4s ease;
}

@keyframes hr-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

/* ---------- Guest counter ---------- */
.hr-guest-counter {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}

.hr-booking-form .hr-guest-counter .hr-guest-counter__btn {
  flex: 0 0 36px !important;
}

/* Hide default number input spinners (Chrome/Safari/Edge/Firefox) — !important to override Drupal/theme CSS. */
.hr-guest-counter__value::-webkit-outer-spin-button,
.hr-guest-counter__value::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  display: none !important;
}
.hr-guest-counter__value {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.hr-guest-counter__btn {
  width: 36px;
  height: 36px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 1.5px solid var(--hr-border);
  background: var(--hr-bg-alt);
  color: var(--hr-text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.hr-guest-counter__btn:first-child {
  border-radius: var(--hr-radius-sm) 0 0 var(--hr-radius-sm);
}

.hr-guest-counter__btn:last-child {
  border-radius: 0 var(--hr-radius-sm) var(--hr-radius-sm) 0;
}

.hr-guest-counter__btn:hover {
  background: var(--hr-bg-hover);
  border-color: var(--hr-primary);
  color: var(--hr-primary);
}

.hr-guest-counter__btn:active {
  transform: scale(0.95);
}

.hr-booking-form .hr-guest-counter input.hr-guest-counter__value {
  width: 48px !important;
  max-width: 48px !important;
  min-width: 0 !important;
  flex: 0 0 48px !important;
  height: 36px;
  min-height: 0;
  padding: 0;
  margin: 0;
  line-height: 36px;
  box-sizing: border-box;
  border: 1.5px solid var(--hr-border);
  border-left: none;
  border-right: none;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--hr-text);
  background: var(--hr-bg);
}

/* ---------- Flash highlight (jump from room modal) ---------- */
.hr-booking-form--flash {
  animation: hr-flashRing 1.8s ease;
}

@keyframes hr-flashRing {
  0%, 100% { box-shadow: 0 4px 24px var(--hr-shadow), 0 1px 3px var(--hr-shadow); }
  20%, 60% { box-shadow: 0 0 0 4px var(--hr-primary), 0 4px 24px var(--hr-shadow); }
}

/* ---------- Privacy policy note ---------- */
.hr-booking-policy {
  font-size: 12px;
  line-height: 1.6;
  color: var(--hr-text-secondary);
  margin: 0 0 12px 0;
}

.hr-booking-policy a {
  color: var(--hr-primary);
  text-decoration: underline;
}

.hr-booking-policy a:hover {
  text-decoration: none;
}

/* ---------- Back button ---------- */
.hr-back-btn {
  background: none;
  border: none;
  color: var(--hr-text-secondary);
  font-size: 13px;
  cursor: pointer;
  padding: 5px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--hr-transition);
}

/* ---------- Focus visible (keyboard nav) ---------- */
.hr-booking-form *:focus-visible {
  outline: 2px solid var(--hr-primary);
  outline-offset: 2px;
}

.hr-room-selected-name {
  padding: 10px 14px;
  background: var(--hr-bg-alt);
  border-radius: 10px;
  border: 1.5px solid var(--hr-border);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  color: var(--hr-text);
}

.hr-room-selected-price {
  padding: 10px 14px;
  background: var(--hr-primary-bg);
  border-radius: 10px;
  border: 1.5px solid var(--hr-primary-border);
  font-weight: 700;
  color: var(--hr-primary);
  font-size: 18px;
  line-height: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ---------- Inline Mode ---------- */
.hr-booking-inline-wrapper {
  display: flex;
  justify-content: center;
  padding: 8px;
}

.hr-booking-form--inline {
  max-width: 720px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.hr-booking-form--inline:hover {
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .hr-booking-preview {
    padding: 20px 20px;
    margin: 0 8px;
  }

  .hr-booking-modal {
    max-height: calc(100vh - 30px);
    width: 100%;
    max-width: 100%;
    margin: auto;
    border-radius: 16px;
  }

  .hr-booking-modal-overlay {
    padding: 0 15px;
    align-items: center;
    justify-content: center;
  }

  .hr-booking-modal__close {
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
  }

  .hr-booking-form {
    padding: 20px 16px;
    border-radius: 16px;
    margin: 0;
    max-width: 100%;
  }

  .hr-form-row {
    flex-direction: column;
    gap: 0;
  }

  .hr-form-group {
    margin-bottom: 12px;
  }

  .hr-steps {
    margin-bottom: 16px;
  }

  .hr-booking-form__subtitle {
    margin-bottom: 14px;
  }

  .hr-room-card {
    padding: 12px;
  }

  .hr-room-card__price-value {
    font-size: 17px;
  }

  .hr-room-card__price-unit {
    font-size: 11px;
  }

  .hr-room-card__total {
    font-size: 12px;
  }

  .hr-results-carousel__viewport {
    padding: 2px 34px;
  }

  .hr-results-carousel__nav {
    width: 28px;
    height: 28px;
    margin-top: -14px;
    font-size: 0;
  }

  .hr-results-carousel__nav--prev { left: 4px; }
  .hr-results-carousel__nav--next { right: 4px; }

  .hr-price-breakdown {
    padding: 10px;
  }

  .hr-success {
    padding: 24px 8px;
  }

  .hr-search-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hr-search-actions .hr-search-btn {
    white-space: normal;
  }

  .hr-booking-form__title {
    font-size: 18px;
  }

  .hr-steps {
    margin-bottom: 20px;
  }

  .hr-step {
    font-size: 11px;
  }

  /* Compact fields on mobile. */
  .hr-form-group label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .hr-booking-form input[type="date"],
  .hr-booking-form input[type="datetime-local"],
  .hr-booking-form input[type="text"],
  .hr-booking-form input[type="email"],
  .hr-booking-form input[type="tel"],
  .hr-booking-form input[type="number"],
  .hr-booking-form select,
  .hr-booking-form textarea {
    padding: 8px 12px;
    font-size: 13px;
  }

  .hr-room-selected-name {
    padding: 8px 12px;
    font-size: 13px;
  }

  .hr-room-selected-price {
    padding: 8px 12px;
    font-size: 16px;
    min-height: 38px;
  }

  .hr-booking-form .hr-field-notes {
    height: 76px;
    min-height: 76px;
  }

  .hr-guest-counter__btn {
    width: 34px;
    height: 34px;
    flex: 0 0 34px !important;
  }

  .hr-booking-form .hr-guest-counter input.hr-guest-counter__value {
    height: 34px;
    line-height: 34px;
  }

  .hr-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .hr-booking-form__subtitle {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .hr-step span:not(.hr-step-number) {
    display: none;
  }
}
