/* =========================================================
   OBV OzyTrip – Popup Styles
   ========================================================= */

/* ----- Trigger button ----- */
.obv-ozytrip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #e31b1b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  line-height: 1;
}
.obv-ozytrip-trigger:hover { background-color: #c0140f; transform: translateY(-1px); }
.obv-ozytrip-trigger:active { transform: translateY(0); }

/* ----- Overlay ----- */
.obv-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: obv-fade-in .2s ease;
}
@keyframes obv-fade-in { from{opacity:0} to{opacity:1} }

/* ----- Popup container ----- */
.obv-popup {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  animation: obv-slide-up .25s ease;
}
@keyframes obv-slide-up { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }

/* ----- Header ----- */
.obv-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #111;
  color: #fff;
  flex-shrink: 0;
}
.obv-popup-brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}
.obv-popup-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  opacity: .8;
  transition: opacity .15s;
}
.obv-popup-close:hover { opacity: 1; }

/* ----- Steps bar ----- */
.obv-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: #f5f5f5;
  flex-shrink: 0;
}
.obv-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #999;
  transition: all .2s;
  position: relative;
}
.obv-step-dot::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 2px;
  background: #ddd;
}
.obv-step-dot:last-child::after { display: none; }
.obv-step-dot.active {
  background: #e31b1b;
  color: #fff;
}
.obv-step-dot.done {
  background: #2ecc71;
  color: #fff;
}

/* ----- Body (scrollable) ----- */
.obv-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.obv-step-panel {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}
.obv-step-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 0 0 16px;
}

/* ----- Loading ----- */
.obv-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: #666;
}
.obv-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #eee;
  border-top-color: #e31b1b;
  border-radius: 50%;
  animation: obv-spin .7s linear infinite;
}
@keyframes obv-spin { to{transform:rotate(360deg)} }

/* ----- Error ----- */
.obv-error-msg {
  background: #fff0f0;
  border-left: 4px solid #e31b1b;
  color: #c00;
  padding: 12px 16px;
  margin: 0 20px 16px;
  border-radius: 4px;
  font-size: 14px;
}

/* ----- Calendar ----- */
.obv-calendar-wrapper { margin-bottom: 16px; }
.obv-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.obv-cal-prev, .obv-cal-next {
  background: #f0f0f0;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 16px;
  transition: background .15s;
}
.obv-cal-prev:hover, .obv-cal-next:hover { background: #e0e0e0; }
.obv-cal-prev:disabled, .obv-cal-next:disabled { opacity: .35; cursor: default; }
.obv-cal-month-label { font-weight: 700; font-size: 15px; }
.obv-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.obv-cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #999;
  padding: 4px 0;
  text-transform: uppercase;
}
.obv-cal-day {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all .15s;
  position: relative;
}
.obv-cal-day:hover:not(.disabled):not(.empty) { background: #ffe5e5; }
.obv-cal-day.available {
  color: #111;
  font-weight: 600;
  background: #eafaf1;
  border: 1px solid #a9dfbf;
  border-radius: 8px;
}
.obv-cal-day.available:hover:not(.selected) { background: #d5f5e3; border-color: #2ecc71; }
.obv-cal-day.unavailable { color: #ccc; cursor: not-allowed; }
.obv-cal-day.disabled { color: #ddd; cursor: not-allowed; }
.obv-cal-day.empty { cursor: default; }
.obv-cal-day.selected {
  background: #e31b1b;
  color: #fff;
  font-weight: 700;
}
.obv-cal-day .obv-cal-quota {
  display: block;
  font-size: 9px;
  color: #2ecc71;
  line-height: 1;
}
.obv-cal-day.selected .obv-cal-quota { color: rgba(255,255,255,.8); }

/* ----- Calendar inline loading ----- */
.obv-cal-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
}
.obv-cal-loading .obv-spinner { width: 28px; height: 28px; border-width: 3px; }

/* ----- Spinner pequeño para total del paso 5 ----- */
.obv-spinner-sm { width: 18px; height: 18px; border-width: 2px; display: inline-block; vertical-align: middle; }
.obv-total-spinner { display: inline-flex; align-items: center; }

/* ----- Time slots ----- */
.obv-time-slots { margin-top: 16px; }
.obv-time-slots h3 { font-size: 15px; margin-bottom: 10px; }
.obv-time-slots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.obv-time-btn {
  background: #f0f0f0;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all .15s;
}
.obv-time-btn:hover { background: #ffe5e5; border-color: #e31b1b; }
.obv-time-btn.selected { background: #e31b1b; color: #fff; border-color: #e31b1b; }

/* ----- Age groups ----- */
.obv-summary-bar {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #444;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.obv-age-groups-list { display: flex; flex-direction: column; gap: 12px; }
.obv-age-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.obv-age-group-info { flex: 1; }
.obv-age-group-name { font-weight: 700; font-size: 15px; }
.obv-age-group-price { font-size: 13px; color: #666; }
.obv-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
}
.obv-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e31b1b;
  background: #fff;
  color: #e31b1b;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  line-height: 1;
}
.obv-qty-btn:hover { background: #e31b1b; color: #fff; }
.obv-qty-btn:disabled { border-color: #ddd; color: #ddd; cursor: default; }
.obv-qty-btn:disabled:hover { background: #fff; }
.obv-qty-value { font-size: 16px; font-weight: 700; min-width: 24px; text-align: center; }
.obv-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 4px;
  font-size: 16px;
  border-top: 2px solid #f0f0f0;
  margin-top: 8px;
}
.obv-total-bar strong { font-size: 20px; color: #e31b1b; }

/* ----- Encounter / Meeting points ----- */
.obv-encounter-list { display: flex; flex-direction: column; gap: 10px; }
.obv-encounter-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid #eee;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
}
.obv-encounter-btn:hover { border-color: #e31b1b; background: #fff8f8; }
.obv-encounter-btn.selected { border-color: #e31b1b; background: #fff0f0; }
.obv-encounter-btn .enc-icon { font-size: 20px; flex-shrink: 0; }
.obv-encounter-btn .enc-info strong { display: block; font-size: 14px; }
.obv-encounter-btn .enc-info small { font-size: 12px; color: #666; }

/* ----- Billing form ----- */
.obv-billing-form { display: flex; flex-direction: column; gap: 14px; }
.obv-form-row { display: flex; flex-direction: column; gap: 4px; }
.obv-form-row label { font-size: 13px; font-weight: 600; color: #444; }
.obv-form-row input,
.obv-form-row select {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  transition: border .15s;
  width: 100%;
}
.obv-form-row input:focus,
.obv-form-row select:focus { border-color: #e31b1b; }
.obv-form-row input.invalid { border-color: #e31b1b; background: #fff8f8; }

/* ----- Payment summary / breakdown ----- */
.obv-payment-summary {
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.obv-payment-summary .obv-summary-bar {
  margin-bottom: 10px;
  background: none;
  padding: 0;
  font-size: 13px;
  color: #555;
}
.obv-breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}
.obv-bdr-label { flex: 1; color: #333; }
.obv-bdr-unit  { font-size: 12px; color: #999; white-space: nowrap; }
.obv-bdr-sub   { font-weight: 600; color: #333; min-width: 90px; text-align: right; white-space: nowrap; }
.obv-breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  color: #333;
}
.obv-breakdown-total strong { font-size: 20px; color: #e31b1b; }

/* ----- Currency ----- */
.obv-step-subtitle { font-size: 13px; color: #666; margin-bottom: 10px; }
.obv-currency-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}
.obv-currency-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 2px solid #eee;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all .15s;
}
.obv-currency-btn:hover { border-color: #e31b1b; }
.obv-currency-btn.active { border-color: #e31b1b; background: #fff0f0; color: #e31b1b; }
.obv-flag-icon { font-size: 22px; }

/* ----- Payment methods ----- */
.obv-payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.obv-payment-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border: 2px solid #eee;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  min-height: 56px;
  font-size: 16px;
  font-weight: 600;
}
.obv-payment-btn img { max-height: 32px; max-width: 140px; object-fit: contain; }
.obv-payment-btn:hover { border-color: #e31b1b; background: #fff8f8; }
.obv-payment-btn.selected { border-color: #e31b1b; background: #fff0f0; }

/* ----- Order summary ----- */
.obv-order-summary { margin-bottom: 20px; }
.obv-summary-product {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.obv-summary-product img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.obv-summary-product strong { display: block; font-size: 15px; margin-bottom: 4px; }
.obv-summary-detail-date,
.obv-summary-detail-passengers { font-size: 13px; color: #666; }
.obv-order-total-block { padding: 12px 0; }
.obv-order-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  align-items: center;
}
.obv-order-total-row strong { font-size: 22px; color: #e31b1b; }

/* ----- Pay button ----- */
.obv-btn-pay {
  display: block;
  width: 100%;
  background: #e31b1b;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.obv-btn-pay:hover { background: #c0140f; }

/* ----- Success ----- */
.obv-success-panel {
  text-align: center;
  padding: 32px 20px;
}
.obv-success-icon {
  width: 64px;
  height: 64px;
  background: #2ecc71;
  color: #fff;
  border-radius: 50%;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.obv-success-panel h2 { color: #111; font-size: 22px; margin-bottom: 8px; }
.obv-success-msg { color: #666; font-size: 14px; margin-bottom: 16px; }
.obv-success-details { background: #f5f5f5; border-radius: 10px; padding: 14px; font-size: 14px; margin-bottom: 16px; text-align: left; }
.obv-btn-close-success {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 15px;
  cursor: pointer;
}

/* ----- Footer ----- */
.obv-popup-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
  background: #fff;
}
.obv-btn-back {
  background: none;
  border: none;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
}
.obv-btn-next {
  background: #e31b1b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.obv-btn-next:hover { background: #c0140f; }
.obv-btn-next:disabled { background: #ddd; cursor: not-allowed; }

/* ----- Mobile ----- */
@media (max-width: 520px) {
  .obv-popup-overlay { padding: 0; align-items: flex-end; }
  .obv-popup {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }
  .obv-currency-grid { grid-template-columns: repeat(2, 1fr); }
}
