/* =============================================
   HRIBINADLANI BOOKING — Frontend CSS
   ============================================= */

:root {
  --hnb-green:       #1a472a;
  --hnb-green-mid:   #2d6a4f;
  --hnb-green-light: #52b788;
  --hnb-green-pale:  #d8f3dc;
  --hnb-accent:      #f4a261;
  --hnb-text:        #1b1b1b;
  --hnb-muted:       #6b7280;
  --hnb-border:      #e5e7eb;
  --hnb-bg:          #f9fafb;
  --hnb-white:       #ffffff;
  --hnb-radius:      10px;
  --hnb-shadow:      0 4px 24px rgba(0,0,0,0.08);
  --hnb-transition:  0.2s ease;
}

/* ---- Wrap ---- */
.hnb-booking-wrap {
  max-width: 780px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--hnb-text);
  opacity: 0;
  transition: opacity 0.3s;
}
.hnb-booking-wrap.hnb-loaded { opacity: 1; }

/* ---- Trip card ---- */
.hnb-trip-card {
  background: var(--hnb-white);
  border: 1px solid var(--hnb-border);
  border-radius: var(--hnb-radius);
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--hnb-shadow);
}

.hnb-trip-image img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  display: block;
}

.hnb-trip-info {
  padding: 24px 28px;
}

.hnb-trip-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--hnb-green);
  margin: 0 0 16px;
  line-height: 1.2;
}

.hnb-trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hnb-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--hnb-muted);
  background: var(--hnb-bg);
  border: 1px solid var(--hnb-border);
  border-radius: 20px;
  padding: 5px 12px;
}

.hnb-meta-icon { font-size: 1rem; }

/* ---- Seats bar ---- */
.hnb-seats-wrap { margin-top: 4px; }

.hnb-seats-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--hnb-muted);
  margin-bottom: 6px;
}

.hnb-seats-bar {
  height: 8px;
  background: #e9ecef;
  border-radius: 99px;
  overflow: hidden;
}

.hnb-seats-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--hnb-green-light), var(--hnb-green));
  border-radius: 99px;
  transition: width 0.6s ease;
}

.hnb-seats-warning {
  font-size: 0.82rem;
  color: #c05621;
  margin: 6px 0 0;
  font-weight: 600;
}

/* ---- Notices ---- */
.hnb-notice {
  border-radius: var(--hnb-radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.hnb-notice-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  text-align: center;
}
.hnb-notice-success .hnb-success-icon { font-size: 2.5rem; margin-bottom: 8px; }
.hnb-notice-success h3 { margin: 0 0 8px; font-size: 1.3rem; }
.hnb-notice-success p { margin: 4px 0; }

.hnb-notice-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.hnb-notice-full {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  text-align: center;
  padding: 32px;
}
.hnb-notice-full h3 { font-size: 1.3rem; margin: 0 0 8px; }

.hnb-notice-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 14px 18px;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 18px;
}

/* ---- Form wrap ---- */
.hnb-form-wrap {
  background: var(--hnb-white);
  border: 1px solid var(--hnb-border);
  border-radius: var(--hnb-radius);
  padding: 32px;
  box-shadow: var(--hnb-shadow);
}

.hnb-form-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--hnb-green);
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--hnb-green-pale);
}

/* ---- Form grid ---- */
.hnb-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.hnb-field { display: flex; flex-direction: column; gap: 5px; }
.hnb-col-1 { grid-column: span 2; }
.hnb-col-2 { grid-column: span 1; }
.hnb-col-3 { grid-column: span 1; }

@media (max-width: 600px) {
  .hnb-form-grid { grid-template-columns: 1fr; }
  .hnb-col-1, .hnb-col-2, .hnb-col-3 { grid-column: span 1; }
}

.hnb-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.hnb-req { color: #dc2626; }

.hnb-field input[type="text"],
.hnb-field input[type="email"],
.hnb-field input[type="tel"],
.hnb-field input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--hnb-border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--hnb-text);
  background: var(--hnb-white);
  transition: border-color var(--hnb-transition), box-shadow var(--hnb-transition);
  box-sizing: border-box;
  -webkit-appearance: none;
}

.hnb-field input:focus {
  outline: none;
  border-color: var(--hnb-green-light);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}

.hnb-field input.hnb-locked-field {
  background: var(--hnb-bg);
  color: var(--hnb-muted);
  cursor: not-allowed;
}

.hnb-field input.hnb-field-error {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248,113,113,0.15);
}

/* ---- Contact preferences ---- */
.hnb-checkboxes {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hnb-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
}

.hnb-checkbox-label input[type="checkbox"] { display: none; }

.hnb-checkbox-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--hnb-border);
  border-radius: 4px;
  background: var(--hnb-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--hnb-transition);
  flex-shrink: 0;
}

.hnb-checkbox-label input:checked + .hnb-checkbox-box {
  background: var(--hnb-green);
  border-color: var(--hnb-green);
}

.hnb-checkbox-label input:checked + .hnb-checkbox-box::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: 700;
}

/* ---- Guests control ---- */
.hnb-guests-block {
  margin-bottom: 20px;
}

.hnb-guests-block > label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.hnb-guests-control {
  display: flex;
  align-items: center;
  gap: 0;
}

.hnb-guests-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--hnb-border);
  background: var(--hnb-bg);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--hnb-green);
  transition: all var(--hnb-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#hnb-guests-minus { border-radius: 8px 0 0 8px; }
#hnb-guests-plus  { border-radius: 0 8px 8px 0; }

.hnb-guests-btn:hover { background: var(--hnb-green-pale); border-color: var(--hnb-green-light); }
.hnb-guests-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.hnb-guests-input {
  width: 64px !important;
  text-align: center;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  -moz-appearance: textfield;
}
.hnb-guests-input::-webkit-inner-spin-button { display: none; }

.hnb-guests-max {
  margin-left: 12px;
  font-size: 0.82rem;
  color: var(--hnb-muted);
}

/* ---- Promo block ---- */
.hnb-promo-block {
  margin-bottom: 20px;
}

.hnb-promo-block > label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.hnb-promo-row {
  display: flex;
  gap: 10px;
}

.hnb-promo-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--hnb-border);
  border-radius: 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hnb-promo-row input:focus {
  outline: none;
  border-color: var(--hnb-green-light);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}

.hnb-btn-secondary {
  padding: 10px 18px;
  background: var(--hnb-bg);
  border: 1.5px solid var(--hnb-border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hnb-green);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--hnb-transition);
}
.hnb-btn-secondary:hover { background: var(--hnb-green-pale); border-color: var(--hnb-green-light); }

.hnb-promo-result {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 18px;
}
.hnb-promo-result.valid   { color: #16a34a; }
.hnb-promo-result.invalid { color: #dc2626; }

/* ---- Price summary ---- */
.hnb-price-summary {
  background: linear-gradient(135deg, var(--hnb-green) 0%, var(--hnb-green-mid) 100%);
  border-radius: var(--hnb-radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  color: white;
}

.hnb-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.hnb-price-label { font-size: 1rem; opacity: 0.9; }
.hnb-price-total { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.5px; }
.hnb-price-note  { font-size: 0.78rem; opacity: 0.7; margin: 0; }

/* ---- Submit button ---- */
.hnb-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--hnb-accent) 0%, #e76f51 100%);
  color: white;
  border: none;
  border-radius: var(--hnb-radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--hnb-transition);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.hnb-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(244,162,97,0.4);
}

.hnb-submit-btn:active { transform: translateY(0); }

.hnb-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ---- Spinner ---- */
.hnb-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: hnb-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

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

/* ---- Security shield banner ---- */
.hnb-security-shield {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #166534;
}

/* ---- Secure note ---- */
.hnb-secure-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--hnb-muted);
  margin-top: 12px;
  margin-bottom: 0;
}

/* ---- Error highlight ---- */
.hnb-field input.hnb-has-error {
  border-color: #f87171;
}

/* ════════════════════════════════════════════
   STEP INDICATOR
   ════════════════════════════════════════════ */
.hnb-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
  padding: 0 8px;
  position: relative;
}

/* Connector line between steps */
.hnb-steps::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: var(--hnb-border);
  z-index: 0;
}

.hnb-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 160px;
  position: relative;
  z-index: 1;
}

.hnb-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--hnb-border);
  background: var(--hnb-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hnb-muted);
  transition: all 0.25s ease;
  position: relative;
}

/* Step numbers via counter */
#hnb-step-ind-1 .hnb-step-circle::before { content: '1'; }
#hnb-step-ind-2 .hnb-step-circle::before { content: '2'; }

.hnb-step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hnb-muted);
  transition: color 0.25s ease;
  white-space: nowrap;
}

/* Active step */
.hnb-step.active .hnb-step-circle {
  border-color: var(--hnb-green);
  background: var(--hnb-green);
  color: white;
  box-shadow: 0 0 0 4px var(--hnb-green-pale);
}
.hnb-step.active .hnb-step-label {
  color: var(--hnb-green);
}

/* Done step (step 1 when on step 2) */
.hnb-step.done .hnb-step-circle {
  border-color: var(--hnb-green-light);
  background: var(--hnb-green-light);
  color: white;
}
.hnb-step.done .hnb-step-circle::before {
  content: '✓';
  font-size: 0.85rem;
}
.hnb-step.done .hnb-step-label {
  color: var(--hnb-green-light);
}

/* ════════════════════════════════════════════
   TRUST BADGES (Step 2)
   ════════════════════════════════════════════ */
.hnb-stripe-trust {
  margin: 16px 0 20px;
}

.hnb-trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 10px 14px;
  background: var(--hnb-bg);
  border: 1px solid var(--hnb-border);
  border-radius: 8px;
}

.hnb-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: #4b5563;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* Separator dots between items */
.hnb-trust-item + .hnb-trust-item::before {
  content: '·';
  color: var(--hnb-border);
  font-size: 1rem;
  font-weight: 400;
  margin-right: 6px;
}

/* SSL shield icon */
.hnb-trust-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Card logos — actual card brand SVGs */
.hnb-card-logos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hnb-card-logo {
  height: 18px !important;
  width: auto !important;
  max-width: 38px !important;
  border-radius: 3px;
  display: block;
  flex-shrink: 0;
}

/* Stripe wordmark */
.hnb-stripe-logo {
  height: 16px !important;
  width: auto !important;
  max-width: 70px !important;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .hnb-form-wrap { padding: 20px 16px; }
  .hnb-trip-info  { padding: 18px 16px; }
  .hnb-trip-name  { font-size: 1.3rem; }
  .hnb-price-total { font-size: 1.3rem; }
  .hnb-submit-btn  { font-size: 1rem; padding: 14px; }
  .hnb-trip-meta   { gap: 8px; }

  /* Steps — tighter on mobile */
  .hnb-steps::before { width: 80px; }
  .hnb-step-circle   { width: 30px; height: 30px; font-size: 0.75rem; }
  .hnb-step-label    { font-size: 0.72rem; }

  /* Trust badges — wrap gracefully */
  .hnb-trust-badges  { gap: 8px 12px; padding: 8px 10px; }
  .hnb-trust-item    { font-size: 0.68rem; }
  .hnb-trust-item + .hnb-trust-item::before { display: none; }
  .hnb-card-logo     { height: 15px; }
  .hnb-stripe-logo   { height: 13px; }
}