/* Preço (catalogue plans, order summary, purchase status) and Minha conta (balance, plan, purchases). Same surfaces as the info pages. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.billing-spin { animation: billing-spin 1.2s linear infinite; }
@keyframes billing-spin { to { rotate: 360deg; } }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.billing-state { min-height: 240px; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 32px 20px; text-align: center; border: 1px solid #2e2b34; border-radius: 16px; background: #1c1b20; }
.billing-state > .icon { width: 28px; height: 28px; flex-basis: 28px; color: var(--purple); }
.billing-state[role=alert] > .icon { color: var(--error); }
.billing-state h2 { font: 500 21px/1.25 var(--display); letter-spacing: -.02em; }
.billing-state p { max-width: 52ch; color: #c9bcd6; font-size: 13px; }
.billing-state .button { margin-top: 8px; }
.billing-inline-state { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; color: #c9bcd6; font-size: 13px; }
.billing-inline-state .error-message { margin: 0; }
/* topo dos planos: os personagens ficam à direita da foto; o degradê escurece a esquerda para o título */
.info-hero.pricing-hero { min-height: clamp(220px, 30vw, 340px); align-content: center; background: linear-gradient(90deg, #141317 0%, rgba(20,19,23,.92) 34%, rgba(20,19,23,.35) 62%, rgba(20,19,23,0) 80%), url('./assets/planos/fenaky-planos.webp') right center / cover no-repeat, #141317; }
.pricing-hero .info-hero-copy { max-width: 46%; }
.pricing-hero p { color: #e2d6ec; font-size: 15px; }
.billing-inline-state a, .plan-block a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }

.plan-notice { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 10px; background: #221d2b; color: #e2d6ec; font-size: 13px; line-height: 1.55; }
.plan-notice .icon { color: var(--purple); margin-top: 1px; }
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); gap: 20px; align-items: start; }
.plan-choices { display: grid; gap: 26px; min-width: 0; }
.plan-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.plan-group legend { padding: 0; font: 500 19px/1.3 var(--display); letter-spacing: -.02em; }
.plan-group-note { margin: 4px 0 12px; color: #b9aac6; font-size: 12.5px; }
.plan-ladder { display: grid; gap: 8px; }
.plan-option { position: relative; display: grid; grid-template-columns: 20px minmax(110px, .7fr) minmax(0, 1.3fr) auto; grid-template-areas: "dot credits videos price" "dot rate rate flag"; align-items: center; gap: 4px 16px; padding: 15px 18px; border: 1px solid #2e2b34; border-radius: 12px; background: #1c1b20; cursor: pointer; transition: border-color 200ms var(--ease), background 200ms var(--ease); }
.plan-option::before { content: ''; grid-area: dot; align-self: center; width: 18px; height: 18px; border: 1.5px solid #6a6474; border-radius: 50%; transition: border-color 200ms, background 200ms, box-shadow 200ms; }
.plan-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.plan-option:hover { border-color: #4a3d5e; background: #1f1d24; }
.plan-option:has(input:checked) { border-color: var(--purple); background: #211c2b; }
.plan-option:has(input:checked)::before { border-color: var(--purple); background: var(--purple); box-shadow: inset 0 0 0 3px #211c2b; }
.plan-option:has(input:focus-visible) { outline: 2px solid var(--purple); outline-offset: 3px; }
.plan-group:disabled .plan-option { cursor: not-allowed; opacity: .55; }
.plan-group:disabled .plan-option:has(input:checked) { opacity: 1; }
.plan-credits { grid-area: credits; color: #e2d6ec; font-size: 13px; white-space: nowrap; }
.plan-credits strong { margin-right: 4px; font: 500 24px/1.1 var(--display); letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.plan-videos.plan-time { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #e2d6ec; font-size: 13px; font-variant-numeric: tabular-nums; }
.plan-time b { margin-right: 4px; color: #a796b5; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.plan-videos { grid-area: videos; color: #c9bcd6; font-size: 12.5px; line-height: 1.45; }
.plan-price { grid-area: price; justify-self: end; font: 500 18px/1.2 var(--display); color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plan-rate { grid-area: rate; display: flex; align-items: center; gap: 10px; color: #b9aac6; font-size: 12px; font-variant-numeric: tabular-nums; }
.plan-rate-bar { position: relative; flex: none; width: 72px; height: 4px; border-radius: 2px; background: #2e2b34; overflow: hidden; }
.plan-rate-bar::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--purple); transform-origin: left center; transform: scaleX(var(--rate, 1)); }
.plan-flag { grid-area: flag; justify-self: end; padding: 2px 8px; border-radius: 5px; background: #2a2730; color: #cfc6da; font-size: 11px; font-weight: 600; white-space: nowrap; }
.plan-option-pass { grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-areas: "dot credits price" "dot videos price" "dot rate flag"; }
.plan-option-pass .plan-credits { min-width: 0; white-space: normal; }
.plan-option-pass .plan-credits strong { color: var(--purple); }

.plan-summary { position: sticky; top: 18px; display: grid; gap: 16px; padding: 22px; border: 1px solid #343038; border-radius: 16px; background: var(--surface); }
.plan-summary-body { display: grid; gap: 10px; }
.plan-summary h2 { font: 500 19px/1.3 var(--display); letter-spacing: -.02em; }
.plan-summary-empty { color: #c9bcd6; font-size: 13px; }
.plan-summary-name { display: grid; gap: 2px; }
.plan-summary-name strong { color: #e2d6ec; font-size: 13px; font-weight: 600; }
.plan-summary-price { font: 500 34px/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; animation: plan-settle 480ms var(--ease); }
.plan-summary-price small { margin-left: 6px; font: 500 12px var(--font); letter-spacing: 0; color: #b9aac6; }
@keyframes plan-settle { from { filter: blur(3px); opacity: .55; translate: 0 5px; } }
.plan-summary-terms { margin: 0; padding-left: 18px; display: grid; gap: 5px; color: #d6cbe0; font-size: 12.5px; line-height: 1.5; }
.plan-provisional, .plan-summary-note, .plan-hint { margin: 0; color: #b9aac6; font-size: 12px; line-height: 1.5; }
.plan-block { margin: 10px 0 0; color: #e8d9b9; font-size: 12.5px; line-height: 1.5; }
.plan-hint { display: block; margin-top: 8px; }
.plan-purchase:empty { display: none; }
[data-purchase-status]:focus:not(:focus-visible) { outline: none; }
.plan-purchase > .button { min-height: 46px; font-size: 12px; }

.purchase-state { display: grid; gap: 8px; padding: 16px; border: 1px solid #3a3145; border-radius: 12px; background: #1f1b26; font-size: 12.5px; line-height: 1.55; color: #d6cbe0; }
.purchase-state h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 15px/1.3 var(--font); color: var(--text); }
.purchase-state h3 .icon { color: var(--purple); }
.purchase-state[data-phase=confirmed] { border-color: #2f5a45; background: #17231d; }
.purchase-state[data-phase=confirmed] h3 .icon { color: #9fe0bd; }
.purchase-state[data-phase=closed] { border-color: #5a2f35; background: #241a1d; }
.purchase-state[data-phase=closed] h3 .icon { color: var(--error); }
.purchase-state .error-message { margin: 0; font-size: 12.5px; }
.purchase-line { display: flex; align-items: center; gap: 8px; color: #e2d6ec; }
.purchase-line .icon { color: var(--purple); }
.purchase-product { color: #e2d6ec; font-weight: 600; }
.purchase-wait { padding: 9px 11px; border-radius: 8px; background: #2c2618; color: #f0dcb1; }
.purchase-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.plan-summary .purchase-actions > .button-primary { flex: 1 1 100%; }
.purchase-fallback { color: #b9aac6; font-size: 11.5px; }
.button-danger { background: #4a1f26; color: #ffd6d3; }
.button-danger:hover:not(:disabled) { background: #5c252e; }
.button[aria-disabled=true] { cursor: progress; opacity: .7; }

.account-page { max-width: 1000px; margin: 0 auto; padding: 4px 0 40px; display: grid; gap: 18px; }
.account-page .page-heading { margin-bottom: 4px; flex-wrap: wrap; }
.account-page .page-heading p { overflow-wrap: anywhere; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-alert { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 10px; background: #3a1f24; color: #ffd6d3; font-size: 13px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.account-panel { display: grid; align-content: start; justify-items: start; gap: 10px; min-width: 0; padding: 22px; border: 1px solid #2e2b34; border-radius: 14px; background: #1c1b20; }
.account-panel h2 { font: 500 17px/1.3 var(--display); letter-spacing: -.02em; color: #e2d6ec; }
.balance-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; color: #d6cbe0; font-size: 13px; }
.balance-value { font: 500 46px/1 var(--display); letter-spacing: -.035em; color: var(--text); font-variant-numeric: tabular-nums; }
.balance-sub { color: #b9aac6; font-size: 12.5px; line-height: 1.55; }
.pass-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; padding: 10px 12px; border-radius: 9px; background: var(--purple-subtle); color: #e6dcff; font-size: 12.5px; line-height: 1.5; }
.pass-line .icon { color: var(--purple); }
.plan-current { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.plan-current strong { font-size: 15px; }
.status-pill { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 700; white-space: nowrap; background: #2a2730; color: #d6cfe0; }
.status-pill[data-tone=good] { background: #1c3328; color: #a6e6c4; }
.status-pill[data-tone=bad] { background: #3a1f24; color: #ffbcb8; }
.status-pill[data-tone=wait] { background: #3a2e1a; color: #f2cf96; }
.account-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; width: 100%; margin: 4px 0; }
.account-facts dt { color: #a796b5; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.account-facts dd { margin: 2px 0 0; color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.account-purchase:empty { display: none; }
.account-history { display: grid; gap: 12px; }
.account-history .info-title { margin-top: 6px; }
.account-table tbody th { font-weight: 600; }
.account-table:focus { outline: none; }
.account-more { display: flex; justify-content: center; margin-top: 12px; }

@media (max-width: 860px) {
  .plan-layout { grid-template-columns: minmax(0, 1fr); }
  .plan-summary { position: static; }
}
@media (max-width: 720px) {
  .plan-option { grid-template-columns: 20px minmax(0, 1fr) auto; grid-template-areas: "dot credits price" "dot videos videos" "dot rate rate" "dot flag flag"; padding: 14px; gap: 4px 12px; }
  .plan-flag { justify-self: start; }
  .info-hero.pricing-hero { min-height: 0; overflow: hidden; background: #141317; }
  .pricing-hero::before { content: ''; margin: -20px -20px 0; aspect-ratio: 16/10; background: url('./assets/planos/fenaky-planos.webp') 80% center / cover no-repeat; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
  .pricing-hero .info-hero-copy { max-width: none; }
  .plan-credits strong { font-size: 21px; }
  .plan-summary { padding: 18px; }
  .plan-summary-price { font-size: 30px; }
  .account-grid, .account-facts { grid-template-columns: minmax(0, 1fr); }
  .account-panel { padding: 18px; }
  .balance-value { font-size: 40px; }
  .account-page .page-heading { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .billing-spin, .plan-summary-price { animation: none; }
  .plan-option, .plan-option::before { transition: none; }
}
