/* ==========================================================================
   dAImon — Reusable Checkout Widget Stylesheet
   ========================================================================== */

.checkout-widget {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(11, 30, 60, 0.05);
  overflow: hidden;
  margin-bottom: 40px;
}

.widget-header {
  background: var(--navy);
  color: #ffffff;
  padding: 24px;
}

.widget-header p.code {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.6;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.widget-header h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.widget-body {
  padding: 24px;
}

.price-box {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.price-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}

.price-val {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
  margin: 4px 0;
}

.price-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.qty-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.qty-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
}

.qty-btn {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

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

.qty-input {
  width: 40px;
  text-align: center;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

/* Checkout Wizard Steps */
.checkout-step {
  display: none;
}

.checkout-step.active {
  display: block;
}

.steps-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
}

.steps-indicator::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  position: relative;
  z-index: 2;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.step-dot.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.step-dot.completed {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.checkout-summary-row--total {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.checkout-btn {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  font-size: 15px;
}

/* PayPal Options Selector cards */
.paypal-option-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.paypal-option-card.active {
  border-color: var(--blue) !important;
  background-color: rgba(59, 120, 200, 0.03) !important;
}

/* Success state */
.success-container {
  text-align: center;
  padding: 16px 0;
  animation: zoomIn 0.3s var(--ease) forwards;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.success-checkmark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(92, 168, 40, 0.08);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.success-checkmark svg {
  width: 28px;
  height: 28px;
}

.success-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.success-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.order-details-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  font-size: 13px;
  text-align: left;
  margin-bottom: 20px;
}

.order-details-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.order-details-row:last-child {
  margin-bottom: 0;
}

.order-details-label {
  color: var(--text-light);
  font-weight: 500;
}

.order-details-val {
  color: var(--navy);
  font-weight: 600;
}

/* Loading animations */
@keyframes loader-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .checkout-widget {
    position: static;
    margin-top: 24px;
  }
}
