/**
 * WOW Offer Widget CSS — cart-side offer panel for booking pages
 * Used by: book/water-park.html, book/amusement-park.html, book/combo.html
 */

/* ── Container ──────────────────────────────────────────────── */
.ofw-widget {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
}

.ofw-widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.ofw-widget-header-icon {
  font-size: 18px;
}

.ofw-widget-header-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  font-family: 'Poppins', sans-serif;
}

.ofw-widget-header-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 1px;
}

.ofw-widget-header-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Sections ──────────────────────────────────────────────── */
.ofw-section {
  margin-bottom: 12px;
}

.ofw-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Offer Cards ───────────────────────────────────────────── */
.ofw-offer-card {
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 8px;
  border: 1.5px solid;
  transition: box-shadow .15s, transform .15s;
}

.ofw-offer-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
  transform: translateY(-1px);
}

.ofw-applied {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
}

.ofw-eligible {
  background: #fffbeb;
  border-color: #fde68a;
}

.ofw-missed {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: .75;
}

.ofw-offer-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
}

.ofw-offer-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
  flex: 1;
}

.ofw-savings-pill {
  background: #22c55e;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ofw-eligible-pill {
  background: #f59e0b;
}

.ofw-offer-msg {
  font-size: 11px;
  color: #4b5563;
  margin-top: 5px;
  line-height: 1.5;
}

.ofw-coupon-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px dashed #a855f7;
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 6px;
}

.ofw-terms {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 5px;
  line-height: 1.5;
}

/* ── Coupon Entry ──────────────────────────────────────────── */
.ofw-coupon-section {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.ofw-coupon-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ofw-coupon-form {
  display: flex;
  gap: 8px;
}

.ofw-coupon-input {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Poppins', monospace;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}

.ofw-coupon-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.ofw-coupon-btn {
  padding: 9px 16px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
  white-space: nowrap;
}

.ofw-coupon-btn:hover {
  opacity: .9;
}

.ofw-coupon-msg {
  font-size: 11.5px;
  margin-top: 6px;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Savings Summary Bar ───────────────────────────────────── */
.ofw-savings-bar {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ofw-savings-bar-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.ofw-savings-bar-text {
  flex: 1;
}

.ofw-savings-bar-label {
  font-size: 10px;
  opacity: .8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.ofw-savings-bar-amount {
  font-size: 16px;
  font-weight: 900;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  margin-top: 2px;
}

/* ── Notes / Errors ────────────────────────────────────────── */
.ofw-note {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  padding: 12px 0;
  line-height: 1.5;
}

.ofw-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ── Trace / Debug ─────────────────────────────────────────── */
.ofw-trace-details {
  font-size: 11px;
  color: #64748b;
  margin-top: 10px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 8px;
}

.ofw-trace-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 10.5px;
  color: #94a3b8;
  padding: 4px 0;
}

.ofw-trace-wrap {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ofw-trace-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 6px;
  align-items: start;
  font-size: 10.5px;
  padding: 4px 6px;
  background: #f8fafc;
  border-radius: 5px;
}

.ofw-trace-icon {
  font-size: 12px;
}

.ofw-trace-name {
  font-weight: 600;
  color: #374151;
}

.ofw-trace-reason {
  font-size: 9.5px;
  color: #9ca3af;
  text-align: right;
}

/* ── Loading shimmer ───────────────────────────────────────── */
.ofw-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 12px;
  color: #94a3b8;
}

.ofw-loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #e2e8f0;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: ofw-spin .6s linear infinite;
}

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

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .ofw-widget {
    border-radius: 10px;
    padding: 12px;
  }
  .ofw-coupon-form {
    flex-direction: column;
  }
  .ofw-coupon-btn {
    width: 100%;
  }
}
