/*
 * Subscription checkout — shared component styles.
 *
 * Loaded by Pay & Subscribe, Upgrade Subscription and the superadmin upgrade
 * screen, which all mount PlanConfigurator and/or PaymentMethodsPanel.
 *
 * Why a stylesheet rather than the components' own <style> blocks:
 *  - The gateway widgets are declared with string templates, which never carry
 *    Vue's <style scoped> attribute, so those rules had to be global anyway.
 *  - Laravel Mix inlines SFC styles into the JS bundle WITHOUT minifying them,
 *    so both bundles shipped the same ~24 KB of CSS verbatim.
 *
 * Every selector is prefixed (`pc-` / `srp-`), which is what keeps it namespaced
 * now that the scoping attribute is gone. Keep it that way.
 */
/* ══════════════════════════════════════════════════════════════════
   PlanConfigurator — plan sizing controls (.pc-*)
   ══════════════════════════════════════════════════════════════════ */

/* `color-scheme: light` keeps the native number spinners on the app's light
   palette even when the browser resolves a dark scheme for the document. */
.pc {
    display: flex;
    flex-direction: column;
    gap: 18px;
    color-scheme: light;
}

/* Current package */
.pc__plan { display: flex; flex-direction: column; gap: 2px; }
.pc__eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}
.pc__plan-name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}
.pc__plan-price {
    margin: 4px 0 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.pc__plan-price strong { font-size: 26px; font-weight: 800; color: #1d4ed8; }
.pc__plan-cycle, .pc__plan-term { font-size: 12px; color: #64748b; }
.pc__plan-term { margin: 2px 0 0; }

/* Blocks */
.pc__block { display: flex; flex-direction: column; gap: 10px; }
.pc__block-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #64748b;
}
.pc__block--ai {
    padding: 12px 14px;
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    background: #f5f3ff;
}

/* Stepper rows */
.pc__rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pc__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.pc__row--on { border-color: #a7f3d0; background: #f0fdf4; }
.pc__row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 13px;
}
/* Below ~140px of copy the row breaks rather than hyphenating the label. */
.pc__row-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 140px; }
.pc__row-label { font-size: 13px; font-weight: 600; color: #334155; }
.pc__row-value {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
.pc__row-before { color: #94a3b8; }
.pc__row--on .pc__row-before { text-decoration: line-through; font-size: 12px; }
.pc__row-arrow { color: #cbd5e1; font-size: 10px; }
.pc__row-after { color: #047857; }
.pc__row-control {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex: 0 0 auto;
    margin-left: auto;
}
.pc__row-note { font-size: 11px; font-weight: 600; color: #94a3b8; }
.pc__row-price { font-size: 10px; color: #94a3b8; }

/* Stepper */
.pc__stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.pc__stepper-btn {
    border: 0;
    background: #fff;
    color: #334155;
    width: 28px;
    font-size: 11px;
    cursor: pointer;
    transition: background .15s ease;
}
.pc__stepper-btn:hover:not(:disabled) { background: #eef2ff; color: #4338ca; }
.pc__stepper-btn:disabled { color: #cbd5e1; cursor: not-allowed; }
/* Wide enough for an entitlement total, not a basket quantity: the counters
   hold figures like 10,000, not 0-9. */
.pc__stepper--wide .pc__stepper-input { width: 78px; }
.pc__stepper-input {
    width: 60px;
    border: 0;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    padding: 5px 4px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
    -moz-appearance: textfield;
}
.pc__stepper-input::-webkit-outer-spin-button,
.pc__stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pc__stepper-input:focus { outline: 2px solid #c7d2fe; outline-offset: -2px; }

/* AI tokens */
.pc__ai { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pc__ai-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc__ai-value {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}
.pc__ai-hint { font-size: 11px; color: #7c3aed; }

/* Included module chips */
.pc__included { display: flex; flex-direction: column; gap: 6px; }
.pc__included-label { font-size: 11px; color: #94a3b8; }
.pc__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pc__chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 11px;
    font-weight: 600;
}

/* Module picker */
.pc__picker { position: relative; }
.pc__picker-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border: 1px dashed #c7d2fe;
    border-radius: 10px;
    background: #fff;
    color: #4338ca;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.pc__picker-toggle:hover { border-color: #818cf8; background: #f8faff; }
.pc__picker-caret { margin-left: auto; font-size: 10px; color: #94a3b8; }
/* Position, width and max-height are set inline by floating.js; everything
   here is the panel's appearance only. */
/* Position, width and max-height are set inline by floating.js, and the panel
   itself is what scrolls — see the note on .pc__picker-list. Both axes are
   declared: leaving overflow-x at `visible` promotes it to `auto` and adds a
   stray horizontal scrollbar. */
.pc__picker-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
    overflow-x: hidden;
    overflow-y: auto;
}
/* Sticky rather than a fixed header outside the scroller: the panel is the
   scroll container, so the search box has to ride along and pin itself. */
.pc__picker-search {
    position: sticky;
    top: 0;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    color: #94a3b8;
}
.pc__picker-input {
    flex: 1 1 auto;
    border: 0;
    outline: none;
    font-size: 13px;
    color: #0f172a;
    background: transparent;
    min-width: 0;
}
.pc__picker-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}
/* Deliberately NOT a scroll container of its own. floating.js re-measures the
   panel on every scroll event, and measuring lifts the panel's max-height —
   which clamps any INNER scroller back to 0, because floating.js only saves
   and restores the panel's own scrollTop. One scroller, on the panel. */
.pc__picker-list {
    list-style: none;
    margin: 0;
    padding: 4px;
}
.pc__picker-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}
.pc__picker-option:hover:not(:disabled) { background: #f1f5f9; }
.pc__picker-option.is-selected { background: #ecfdf5; }
/* Listed so the search covers every module, but not purchasable: the
   superadmin has not priced it at /superadmin/addon-pricing. */
.pc__picker-option.is-unavailable { cursor: not-allowed; opacity: .65; }
.pc__picker-option.is-unavailable .pc__picker-option-label { color: #64748b; }
.pc__picker-option-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.pc__picker-option-label { font-size: 13px; font-weight: 600; color: #0f172a; }
.pc__picker-option-desc {
    font-size: 11px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pc__picker-option-price { font-size: 12px; font-weight: 700; color: #4338ca; white-space: nowrap; }
.pc__picker-option-note {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #94a3b8;
    white-space: nowrap;
}
.pc__picker-option-tick { color: #047857; font-size: 13px; }
.pc__picker-empty { margin: 0; padding: 14px; text-align: center; font-size: 12px; color: #94a3b8; }

/* Added modules */
.pc__added { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pc__added-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #a7f3d0;
    border-radius: 9px;
    background: #f0fdf4;
}
.pc__added-tick { color: #047857; font-size: 13px; }
.pc__added-label { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; color: #0f172a; }
.pc__added-price { font-size: 12px; font-weight: 700; color: #047857; white-space: nowrap; }
.pc__added-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 0;
    padding: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}
.pc__added-remove:hover { color: #dc2626; }
/* alurooj.css carries a bare `.fa-times { font-size: 30px }` from the modal
   close-button skin, which every times glyph in the app inherits. */
.pc__added-remove i,
.pc__picker-clear i { font-size: 12px; line-height: 1; }
.pc__added-empty { margin: 0; font-size: 12px; color: #94a3b8; }
/* Picked rows now open the modules block, above its heading. */
.pc__block > .pc__added { margin-bottom: 4px; }
/* A module sold with a count (Warehouse): the count wraps onto its own line. */
.pc__added-row--with-count { flex-wrap: wrap; }
.pc__added-count {
    flex: 1 0 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px dashed #a7f3d0;
}
.pc__added-count-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pc__added-count-label { font-size: 12px; font-weight: 600; color: #334155; }

/* Totals */
.pc__totals {
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pc__total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pc__total-row dt { margin: 0; font-size: 12px; font-weight: 500; color: #475569; min-width: 0; }
.pc__total-row dd { margin: 0; font-size: 12px; font-weight: 600; color: #334155; white-space: nowrap; }
.pc__total-row--muted dt, .pc__total-row--muted dd { color: #94a3b8; }
.pc__total-row--added dt, .pc__total-row--added dd { color: #047857; }
/* Capacity handed back, credited at the add-on's own rate. Amber rather than
   green so it never reads as another thing being bought. */
.pc__total-row--credit dt, .pc__total-row--credit dd { color: #b45309; }
/* Users granted free with a new module: added, but never charged. */
.pc__total-row--free dt, .pc__total-row--free dd { color: #047857; }
.pc__total-row--free dd { font-weight: 700; text-transform: uppercase; font-size: 11px; }
.pc__credit-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 11px;
    color: #b45309;
}
.pc__total-row--grand {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}
.pc__total-row--grand dt { font-size: 13px; font-weight: 700; color: #0f172a; }
.pc__total-row--grand dd { font-size: 19px; font-weight: 800; color: #1d4ed8; }

@media (max-width: 480px) {
    .pc__row-control { width: 100%; align-items: center; flex-direction: row; justify-content: space-between; }
}

/* ══════════════════════════════════════════════════════════════════
   PaymentMethodsPanel — gateway list (.srp-* payment subset)
   ══════════════════════════════════════════════════════════════════ */

/* Plain, unscoped CSS on purpose: the gateway sub-components above are declared
   with string templates, which do not carry Vue's <style scoped> attribute, so
   scoping would leave every button unstyled. The `srp-` prefix keeps the rules
   namespaced instead. Shipping them with this component is what lets the
   upgrade screen render the identical panel from its own bundle. */

/* Payment method header */
.srp-payment-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.srp-payment-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.srp-payment-subtitle {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.srp-panel-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.78rem;
  line-height: 1.5;
}

.srp-gateway-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.srp-gateway {
  border: 1px solid #e6e9ef;
  border-left: 3px solid var(--srp-accent, #cbd5e1);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.srp-gateway:hover {
  border-color: #dbe1ea;
  border-left-color: var(--srp-accent, #cbd5e1);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.srp-gateway-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.srp-gateway-icon {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--srp-accent-bg, #f1f5f9);
  color: var(--srp-accent, #475569);
  font-size: 1.05rem;
}

.srp-gateway-mono {
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
}

.srp-gateway-body {
  flex: 1 1 auto;
  min-width: 0;
}

.srp-gateway-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.srp-gateway-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.srp-gateway-sub {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.srp-badge {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}
.srp-badge--ready { background: #ecfdf5; color: #047857; }
.srp-badge--pending { background: #f1f5f9; color: #64748b; }

.srp-gateway-actions {
  width: 100%;
}

/* Per-gateway accent tokens */
.srp-gateway--stripe { --srp-accent: #635bff; --srp-accent-bg: #eeeeff; }
.srp-gateway--paypal { --srp-accent: #0070ba; --srp-accent-bg: #e8f3fb; }
.srp-gateway--razorpay { --srp-accent: #3395ff; --srp-accent-bg: #eaf3ff; }
.srp-gateway--flutterwave { --srp-accent: #f5a623; --srp-accent-bg: #fff6e5; }
.srp-gateway--paystack { --srp-accent: #00a8c9; --srp-accent-bg: #e6f9ff; }
.srp-gateway--offline { --srp-accent: #475569; --srp-accent-bg: #f1f5f9; }
.srp-gateway--pesapal { --srp-accent: #1a2b49; --srp-accent-bg: #e9edf3; }
.srp-gateway--myfatoorah { --srp-accent: #0f9d58; --srp-accent-bg: #e7f7ee; }
.srp-gateway--duitnow { --srp-accent: #d0021b; --srp-accent-bg: #fdeceb; }
.srp-gateway--generic { --srp-accent: var(--brand-600, #2563eb); --srp-accent-bg: var(--brand-50, #eff6ff); }

/* Pay buttons */
.srp-pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

@media (max-width: 480px) {
  .srp-pay-grid { grid-template-columns: 1fr; }
}

.srp-pay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.9rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid #d7dce4;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.srp-pay-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.srp-pay-btn:focus-visible {
  outline: 2px solid var(--brand-500, #3b82f6);
  outline-offset: 2px;
}

.srp-pay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.srp-pay-btn-logo {
  height: 1.15rem;
  width: auto;
}

/* Brand-tinted variants */
.srp-pay-btn--card { background: #f5f4ff; border-color: #635bff66; color: #4a3fe0; }
.srp-pay-btn--card:hover:not(:disabled) { background: #ebe9ff; border-color: #635bff; }

.srp-pay-btn--fpx { background: #eef4fa; border-color: #0b3b7566; color: #0b3b75; }
.srp-pay-btn--fpx:hover:not(:disabled) { background: #dfeaf6; border-color: #0b3b75; }

.srp-pay-btn--grabpay { background: #eafbf1; border-color: #00b14f66; color: #00913f; }
.srp-pay-btn--grabpay:hover:not(:disabled) { background: #d9f7e6; border-color: #00b14f; }

.srp-pay-btn--offline { background: #f4f6f8; border-color: #47556966; color: #334155; }
.srp-pay-btn--offline:hover:not(:disabled) { background: #e9edf1; border-color: #475569; }

.srp-pay-btn--razorpay { background: #eef6ff; border-color: #3395ff66; color: #0f4fa8; }
.srp-pay-btn--razorpay:hover:not(:disabled) { background: #dfeeff; border-color: #3395ff; }

.srp-pay-btn--flutterwave { background: #fff8e9; border-color: #f5a62366; color: #92610a; }
.srp-pay-btn--flutterwave:hover:not(:disabled) { background: #fff0cf; border-color: #f5a623; }

.srp-pay-btn--paystack { background: #eafcff; border-color: #00a8c966; color: #007289; }
.srp-pay-btn--paystack:hover:not(:disabled) { background: #d7f7ff; border-color: #00a8c9; }

.srp-pay-btn--myfatoorah { background: #ecfaf2; border-color: #0f9d5866; color: #0b7a44; }
.srp-pay-btn--myfatoorah:hover:not(:disabled) { background: #daf5e5; border-color: #0f9d58; }

.srp-pay-btn--generic { background: var(--brand-50, #eff6ff); border-color: var(--brand-500, #3b82f6); color: var(--brand-700, #1d4ed8); }
.srp-pay-btn--generic:hover:not(:disabled) {
  background: var(--brand-100, #dbeafe);
  border-color: var(--brand-600, #2563eb);
}

.srp-card-logos {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  flex-wrap: wrap;
}

.srp-card-logos img {
  height: 1.3rem;
  width: auto;
  opacity: 0.9;
}

.srp-hint-text {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.srp-offline-details {
  margin-top: 0.7rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e6e9ef;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #334155;
}

.srp-paypal-slot {
  min-height: 2.9rem;
}

.srp-scripted-method {
  width: 100%;
}

.srp-loading-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px dashed #d7dce4;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.srp-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  border-top-color: var(--brand-500, #3b82f6);
  animation: srp-spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes srp-spin {
  to { transform: rotate(360deg); }
}

.srp-error-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: #b91c1c;
  flex-wrap: wrap;
}

.srp-error-text {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: #b91c1c;
}

.srp-retry-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--brand-600, #2563eb);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}

.srp-pesapal-frame {
  border: 1px solid #e6e9ef;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.srp-pesapal-inner {
  width: 100%;
  min-height: 400px;
}

.srp-unavailable {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.78rem;
}

.srp-footer-note {
  margin-top: 1.1rem;
  padding: 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

/* ══════════════════════════════════════════════════════════════════
   SubscriptionUpgradePage — page layout (.su-*)
   ══════════════════════════════════════════════════════════════════ */

/* `color-scheme: light` keeps native controls (the Paid Via select, the
   textarea) on the app's light palette even when the browser resolves a dark
   scheme for the document. */
.su-upgrade {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color-scheme: light;
}

.su-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid transparent;
}
.su-alert--error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.su-alert--info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

/*
 * Same column widths as the checkout's .srp-grid, so the two screens line up
 * when a customer moves between them.
 */
.su-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.su-card-wrap { min-width: 0; }

@media (min-width: 1025px) {
    .su-grid--split { grid-template-columns: 420px minmax(0, 1fr); }
    .su-grid--split .su-card-wrap {
        position: sticky;
        top: 88px;
    }
    /* Single column (superadmin): keep the card at one readable measure rather
       than letting it stretch the full width of a wide screen. */
    .su-grid:not(.su-grid--split) { grid-template-columns: minmax(0, 760px); }
}

.su-card { width: 100%; }
.su-card__business {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}
.su-card__body { display: flex; flex-direction: column; gap: 16px; }
.su-cycle { display: flex; }

.su-note {
    margin: 0;
    display: flex;
    gap: 7px;
    font-size: 11px;
    line-height: 1.5;
    color: #94a3b8;
}

.su-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.su-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.su-field__label { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #64748b; }
.su-field__control {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    background: #fff;
}
.su-field__control:focus { outline: 2px solid #c7d2fe; outline-offset: -1px; border-color: #818cf8; }

/* Mirrors .srp-secure-note on the checkout card, so the two cards close the
   same way. */
.su-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.25rem;
    border-top: 1px solid #eef1f6;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

.su-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Empty / informational states */
.su-state { text-align: center; padding: 28px 12px; }
.su-state__icon { font-size: 30px; color: #cbd5e1; }
.su-state__title {
    margin: 12px 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
}
.su-state__help {
    margin: 0 0 14px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════════
   UpgradeHistory — request table (.su-history*)
   ══════════════════════════════════════════════════════════════════ */

.su-history__empty {
    margin: 0;
    padding: 18px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}
.su-history__table { font-size: 12px; }
.su-history__table th { white-space: nowrap; }
.su-history__date { white-space: nowrap; color: #475569; }
.su-history__lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.su-history__line-label { font-weight: 600; color: #0f172a; margin-right: 6px; }
.su-history__line-meta { color: #64748b; font-size: 11px; }
.su-history__notes {
    margin: 6px 0 0;
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}
.su-history__total { font-weight: 700; color: #0f172a; white-space: nowrap; }
.su-history__source { display: block; color: #475569; }
.su-history__paid { display: block; font-size: 11px; color: #94a3b8; text-transform: capitalize; }
.su-history__actions { white-space: nowrap; }
.su-history__actions .au-button + .au-button { margin-left: 5px; }
.su-right { text-align: right; }

.su-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.su-pill--approved { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.su-pill--pending { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.su-pill--declined { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.su-pill--cancelled { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

/* ══════════════════════════════════════════════════════════════════
   BillingCycleToggle — monthly/yearly switch (.bc-*)
   Shared by the checkout, upgrade and pricing screens.
   ══════════════════════════════════════════════════════════════════ */

.bc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color-scheme: light;
}
.bc-toggle--block { display: flex; width: 100%; }

.bc-toggle__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #475569;
    white-space: nowrap;
}

/* On the pricing page the toggle sits on a light blue gradient, where the slate
   label all but disappears. White alone only reaches ~3.2:1 there — and white is
   already the lightest ink available — so the label gets its own translucent
   chip. That darkens the backdrop to roughly 6:1, clearing WCAG AA for this
   12px bold text, and reads as deliberate next to the white pill. */
.bc-toggle--on-dark .bc-toggle__label {
    color: #fff;
    background: rgba(15, 23, 42, .38);
    border-radius: 999px;
    padding: 5px 12px;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .35);
}

.bc-toggle__track {
    position: relative;
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.bc-toggle--block .bc-toggle__track { flex: 1; }

.bc-toggle__thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    bottom: 4px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .16);
    transition: transform .18s ease;
}

.bc-toggle__option {
    position: relative;
    z-index: 1;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 96px;
    padding: 7px 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: color .18s ease;
}
.bc-toggle__option:hover:not(:disabled) { color: #334155; }
.bc-toggle__option--active { color: #4338ca; }
/* A cycle this product is not sold on: shown so the customer can see which
   one they are on, but not selectable. */
.bc-toggle__option--off { opacity: .45; cursor: not-allowed; }
.bc-toggle__option:focus-visible {
    outline: 2px solid #c7d2fe;
    outline-offset: 2px;
}

.bc-toggle__badge {
    padding: 1px 7px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 10px;
    font-weight: 700;
}

@media (max-width: 480px) {
    .bc-toggle {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }
    .bc-toggle__track { width: 100%; }
    .bc-toggle__option { min-width: 0; padding: 8px 10px; }
}

/* ==========================================================================
   Plan changes — owned add-on modules (PlanConfigurator) and the change
   summary with its impact consent (PlanChangeSummary). Shared by Pay &
   Subscribe and Upgrade Subscription.
   ========================================================================== */

/* Add-on modules the customer owns: removable, unlike the package chips. */
.pc__owned { display: flex; flex-direction: column; gap: 6px; }
.pc__owned-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pc__owned-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #c7d2fe;
    border-radius: 9px;
    background: #f8faff;
}
.pc__owned-row--included { border-color: #a7f3d0; background: #f0fdf4; }
.pc__owned-row--removed { border-style: dashed; border-color: #fecaca; background: #fff7f7; }
.pc__owned-row--removed .pc__owned-label { color: #94a3b8; text-decoration: line-through; }
.pc__owned-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.pc__owned-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}
.pc__owned-badge {
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-decoration: none;
}
.pc__owned-note { font-size: 11px; color: #64748b; }
.pc__owned-row--removed .pc__owned-note { color: #b91c1c; }
.pc__owned-price { font-size: 12px; font-weight: 700; color: #4338ca; white-space: nowrap; }
.pc__owned-row--removed .pc__owned-price { color: #94a3b8; text-decoration: line-through; }
.pc__owned-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    padding: 4px 9px;
    border: 1px solid #fecaca;
    background: #fff;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.pc__owned-toggle:hover { background: #fef2f2; }
.pc__owned-toggle--undo { border-color: #c7d2fe; color: #4338ca; }
.pc__owned-toggle--undo:hover { background: #eef2ff; }
/* The bare `.fa-times { font-size: 30px }` in alurooj.css again. */
.pc__owned-toggle i { font-size: 11px; line-height: 1; }

/* Change summary */
.pcs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #0f172a;
}
.su-summary { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef1f6; }
.pcs__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}
.pcs__title .fa { color: var(--brand-600, #2563eb); }
.pcs__rows { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pcs__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
}
.pcs__row dt { flex: 0 0 auto; max-width: 48%; margin: 0; font-weight: 500; color: #64748b; }
.pcs__row dd {
    margin: 0;
    min-width: 0;
    text-align: right;
    color: #0f172a;
    overflow-wrap: anywhere;
}
.pcs__row--list { align-items: flex-start; }
.pcs__row--list dd { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.pcs__from { color: #64748b; }
.pcs__arrow { margin: 0 5px; font-size: 10px; color: #94a3b8; }
.pcs__change--down strong { color: #b45309; }
.pcs__change--up strong { color: #047857; }
.pcs__chip {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
}
.pcs__chip--added { background: #ecfdf5; color: #047857; }
.pcs__chip--removed { background: #fef2f2; color: #b91c1c; }
.pcs__note {
    display: flex;
    gap: 6px;
    margin: 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: #475569;
}
.pcs__note .fa { margin-top: 3px; color: #94a3b8; }
.pcs__ok {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #047857;
}

/* Impact: a warning, never a block — the checkbox is what lets it proceed. */
.pcs__impact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    background: #fffbeb;
    color: #78350f;
}
.pcs__impact-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #92400e;
}
.pcs__impact-list {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    line-height: 1.5;
}
.pcs__impact-message { display: block; }
.pcs__impact-action { display: block; margin-top: 2px; font-weight: 600; color: #92400e; }
.pcs__impact-safe {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 11.5px;
    font-weight: 600;
    color: #047857;
}
.pcs__ack {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding-top: 8px;
    border-top: 1px dashed #fcd34d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    color: #78350f;
    cursor: pointer;
}
.pcs__ack input { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 0 0; cursor: pointer; }

@media (max-width: 480px) {
    .pcs__row { flex-direction: column; align-items: flex-start; gap: 2px; }
    .pcs__row dt { max-width: none; }
    .pcs__row dd, .pcs__row--list dd { text-align: left; justify-content: flex-start; }
}
