/* Shared coupon offers modal (cart + checkout) */

.offers-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.offers-modal[hidden] {
  display: none !important;
}

.offers-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.offers-modal-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
}

.offers-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #eef2f7;
}

.offers-modal-head h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.offers-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #334155;
}

.offers-modal-body {
  padding: 12px 14px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.offer-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #fafafa;
}

.offer-card--disabled {
  opacity: 0.65;
  background: #f8fafc;
}

.offer-card--applied {
  border-color: #86efac;
  background: #f0fdf4;
}

.offer-card-main {
  flex: 1;
  min-width: 0;
}

.offer-code {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--fg-primary, var(--primary, #e94222));
  letter-spacing: 0.04em;
}

.offer-title {
  display: block;
  font-size: 0.9rem;
  margin-top: 4px;
}

.offer-desc,
.offer-meta,
.offer-reason {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted, var(--text-light, #64748b));
  margin-top: 4px;
  line-height: 1.4;
}

.offer-reason {
  color: #b45309;
}

.offer-save {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #16a34a;
}

.offer-apply-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--fg-primary, var(--primary, #ff6648)), var(--fg-primary-dark, var(--primary-dark, #e94222)));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.offer-applied-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #16a34a;
  align-self: center;
  flex-shrink: 0;
}

.offers-loading,
.offers-empty,
.offers-hint {
  font-size: 0.85rem;
  color: var(--text-muted, var(--text-light, #64748b));
  text-align: center;
  padding: 20px 10px;
  margin: 0;
}

body.offers-modal-open {
  overflow: hidden;
}

@media (min-width: 640px) {
  .offers-modal {
    align-items: center;
  }

  .offers-modal-panel {
    border-radius: 16px;
    max-height: 70vh;
  }
}
