/* =============================================================
   MSIIA — pricing-summary.css
   Order Summary block used on /cart and /checkout.
   ============================================================= */

.pricing-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 14px;
  color: #eaeaea;
  font-family: inherit;
  margin-bottom: 10px;
}

.pricing-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 4px;
}

.pricing-summary-kicker {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #d4af37;
  margin: 0;
}

.pricing-summary-rows {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pricing-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #cfcfcf;
}

.pricing-summary-row-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b8b8b8;
  font-weight: 400;
}

.pricing-summary-row-value {
  font-variant-numeric: tabular-nums;
  color: #eaeaea;
  text-align: right;
  white-space: nowrap;
}

/* Subtotal is a soft accent between the fee rows and tax */
.pricing-summary-row--subtotal {
  padding-top: 10px;
  border-top: 1px dashed rgba(212, 175, 55, 0.18);
  color: #eaeaea;
  font-weight: 500;
}
.pricing-summary-row--subtotal .pricing-summary-row-label,
.pricing-summary-row--subtotal .pricing-summary-row-value {
  color: #eaeaea;
  font-weight: 500;
}

/* Credits (discount, gift card) get a subtle green */
.pricing-summary-row--credit .pricing-summary-row-value {
  color: #7fd39a;
}

/* Grand total block */
.pricing-summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 175, 55, 0.24);
  margin-top: 2px;
}
.pricing-summary-total-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d4af37;
}
.pricing-summary-total-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.05rem);
  font-weight: 700;
  color: #ffffff;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pricing-summary-disclaimer {
  font-size: 0.72rem;
  color: #808080;
  line-height: 1.5;
  margin: 4px 0 0;
}

/* Tooltip info button */
.pricing-info {
  border: none;
  background: transparent;
  padding: 0;
  margin-left: 4px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(212, 175, 55, 0.75);
  border-radius: 50%;
  cursor: help;
  position: relative;
  outline: none;
  transition: color .15s ease, transform .15s ease;
}
.pricing-info:hover,
.pricing-info:focus-visible {
  color: #d4af37;
  transform: translateY(-1px);
}
.pricing-info:focus-visible {
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}

/* Bubble */
.pricing-info::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 200px;
  max-width: 260px;
  padding: 10px 12px;
  background: #0d0d0d;
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #e6e6e6;
  font-size: 0.75rem;
  line-height: 1.45;
  border-radius: 8px;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.pricing-info:hover::after,
.pricing-info:focus-visible::after,
.pricing-info[aria-expanded="true"]::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Sticky total on mobile checkout — keeps grand total in view */
@media (max-width: 640px) {
  .pricing-summary { padding: 18px 18px; }
  .pricing-summary-total-value { font-size: 1.7rem; }

  [data-page="checkout"] .pricing-summary-sticky-mobile .pricing-summary-total {
    position: sticky;
    bottom: 0;
    background: #0d0d0d;
    padding: 12px 16px;
    margin: 12px -18px -18px;
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    z-index: 5;
  }
}

/* Prevent horizontal overflow on ultra-small viewports */
@media (max-width: 360px) {
  .pricing-summary-row,
  .pricing-summary-total { gap: 10px; }
  .pricing-summary-row { font-size: 0.9rem; }
}
