/* Hello, It's Me® — Manage Subscription screen
   Scenario 1 (Stripe/web) states only — App Store/Google Play states don't
   apply here since Scenario 1 is Stripe-only web checkout. UI only until a
   real backend + auth system exist — see docs/payments-integration.md. */

/* Author `display: flex` on these classes would otherwise beat the
   [hidden] attribute (author styles always win over the UA stylesheet's
   [hidden]{display:none}, regardless of selector specificity) — every
   class here is toggled via .hidden in js/manage-subscription.js. */
.ms-test-switcher[hidden],
.ms-status-banner[hidden],
.ms-detail-row[hidden],
.ms-block-btn[hidden],
.ms-action-row[hidden],
.ms-confirm-actions[hidden],
.co-loading-row-wrap[hidden],
.ms-billing-list[hidden] { display: none !important; }

.ms-test-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  background: #FCEFDD;
  color: #8A5A17;
  border-radius: var(--r-md);
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 700;
}

.ms-test-switcher select {
  border-radius: var(--r-sm);
  border: 1px solid #E0C79A;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: #8A5A17;
  background: #fff;
}

.ms-shell {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 32px 28px;
  max-width: 560px;
  margin: 0 auto;
}

.ms-shell__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--him-purple-900);
}

.ms-via {
  display: inline-block;
  background: var(--him-purple-100);
  color: var(--him-purple-700);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  margin: 0 0 20px;
}

.ms-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.ms-status-banner--warn {
  background: #FCEFDD;
  color: #8A5A17;
}

.ms-status-banner__body p {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: inherit;
  line-height: 1.4;
}
.ms-status-banner__body p:last-child { margin-bottom: 0; }

.ms-status-banner__btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 13px;
}

.ms-detail-box {
  background: var(--him-purple-50);
  border-radius: var(--r-md);
  padding: 6px 18px;
  margin-bottom: 22px;
}

.ms-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--him-purple-100);
}
.ms-detail-row:last-child { border-bottom: none; }

.ms-detail-row__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--him-slate-700);
}

.ms-detail-row__value {
  font-size: 15px;
  font-weight: 800;
  color: var(--him-purple-900);
  text-align: right;
}

.ms-detail-row__value--warn { color: #8A5A17; }

.ms-info-box {
  background: var(--him-purple-50);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 22px;
}
.ms-info-box p {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--him-purple-900);
}
.ms-info-box p:last-child { margin-bottom: 0; }

.ms-block-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-bottom: 14px;
}

.ms-action-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ms-action-row .btn {
  flex: 1;
  justify-content: center;
  padding: 12px 14px;
  font-size: 14px;
  white-space: normal;
  text-align: center;
}

.ms-cancel-btn {
  background: #fff;
  color: var(--him-danger);
  box-shadow: inset 0 0 0 2px var(--him-danger);
}
.ms-cancel-btn:hover { background: #FBE9E9; transform: none; }

.ms-fine-print {
  margin: 0;
  font-size: 13px;
  color: var(--him-slate-500);
  font-weight: 600;
  text-align: center;
}

.ms-org-box {
  background: var(--him-purple-50);
  border-radius: var(--r-md);
  padding: 20px;
  text-align: center;
}
.ms-org-box__lead {
  font-size: 16px;
  font-weight: 800;
  color: var(--him-purple-900);
  margin: 0 0 8px;
}
.ms-org-box p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--him-slate-700);
  font-weight: 600;
}

.ms-confirm-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}
.ms-confirm-actions .btn { flex: 1; justify-content: center; }

.ms-card-form {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: 32px 28px;
  max-width: 480px;
  margin: 0 auto;
}

.pay-spinner--dark {
  border-color: var(--him-purple-100);
  border-top-color: var(--him-purple-700);
}

.co-loading-row-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--him-slate-700);
}

.ms-billing-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ms-billing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--him-purple-50);
}

.ms-billing-row__date {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--him-slate-500);
}

.ms-billing-row__desc {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--him-purple-900);
  margin-top: 2px;
}

.ms-billing-row__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.ms-billing-row__amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--him-purple-900);
}

.ms-billing-row__status {
  font-size: 13px;
  font-weight: 700;
  color: var(--him-success);
}

.ms-billing-row__receipt {
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .ms-action-row { flex-direction: column; }
  .ms-detail-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .ms-detail-row__value { text-align: left; }
  .ms-confirm-actions { flex-direction: column; }
}
