/* Adapted from portal-publico-v2/render/proposal.css. Authentication remains in Conta. */
#accountRequiredModal { --o-surface: var(--portal-surface); --o-surface-2: var(--portal-surface-2); --o-ink: var(--portal-ink); --o-muted: var(--portal-muted); --o-border: var(--portal-border); --o-brand: var(--portal-brand); --o-brand-ink: var(--portal-brand-ink); }
#accountRequiredModal .modal-dialog { max-width: 420px; }
#accountRequiredModal .oam { position: relative; overflow: hidden auto; max-height: calc(100dvh - 32px); border: 1px solid var(--o-border); border-radius: 18px; background: var(--o-surface); color: var(--o-ink); box-shadow: 0 30px 90px -20px rgba(0,0,0,.55); font-family: Inter, system-ui, sans-serif; }
#accountRequiredModal [hidden] { display: none !important; }
.oam-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 10px; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; cursor: pointer; }
.oam-x:hover { background: rgba(0,0,0,.55); }
.oam-media { position: relative; aspect-ratio: 16 / 8; background: #0b0f0c; overflow: hidden; }
.oam-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oam-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.82)); }
.oam-lock { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; }
.oam-ctx { position: absolute; left: 16px; right: 16px; bottom: 12px; color: #fff; display: grid; gap: 1px; }
.oam-ctx small { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .78; font-weight: 600; }
.oam-ctx b { font-size: 16px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oam-brands { display: flex; justify-content: center; gap: 10px; padding: 30px 0 4px; }
.oam-brands img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px var(--o-border), 0 8px 18px -8px rgba(0,0,0,.4); }
.oam-brands img:nth-child(2) { transform: translateY(-4px); }
.oam-brands + .oam-body { padding-top: 16px; }
.oam:has(.oam-brands:not([hidden])) .oam-x { background: transparent; color: var(--o-muted); }
.oam:has(.oam-brands:not([hidden])) .oam-x:hover { background: var(--o-surface-2); color: var(--o-ink); }
.oam-body { padding: 18px 22px; text-align: center; }
.oam-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 11px; background: var(--o-surface-2); margin-bottom: 16px; }
.oam-seg button { height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--o-muted); font: 600 13.5px Inter, sans-serif; cursor: pointer; }
.oam-seg button[aria-pressed="true"] { background: var(--o-surface); color: var(--o-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 0 0 1px var(--o-border); }
.oam h2 { margin: 0 0 6px; font-size: 21px; font-weight: 800; color: var(--o-ink); }
#accountRequiredModalDescription { color: var(--o-muted); font-size: 14.2px; line-height: 1.55; margin-bottom: 18px; text-wrap: pretty; }
.oam-btn { width: 100%; min-height: 46px; border-radius: 10px; border: 1px solid var(--o-brand); background: var(--o-brand); color: var(--o-brand-ink); display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 12px; font: 600 15px Inter, sans-serif; text-decoration: none; }
.oam-btn:hover { filter: brightness(1.06); color: var(--o-brand-ink); }
.oam-x:focus-visible, .oam-seg button:focus-visible, .oam-btn:focus-visible { outline: 2px solid var(--o-brand); outline-offset: 2px; }
.oam-legal { margin: 14px 0 0; font-size: 12px; color: var(--o-muted); }
.oam-id { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--o-border); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; color: var(--o-muted); }
.oam-id img { border-radius: 4px; }
@media (max-width: 480px) {
  #accountRequiredModal .modal-dialog { margin: auto 0 0; max-width: none; min-height: 100%; display: flex; align-items: end; }
  #accountRequiredModal .oam { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; }
}
/* ------------------ seletor oficial de periodicidade (.plans-billing, Terminal) */
.portal-upgrade-modal .plans-billing {
  --pb-surface: var(--v3-surface, var(--portal-surface, var(--surface)));
  --pb-border: var(--v3-border, var(--portal-border, var(--border)));
  --pb-text: var(--v3-text, var(--portal-ink, var(--text)));
  --pb-muted: var(--v3-muted, var(--portal-muted, var(--text-2)));
  --pb-brand: var(--v3-brand, var(--portal-brand, var(--brand)));
  --pb-brand-ink: var(--portal-brand-ink, var(--brand-ink, #fff));
  display: flex; justify-content: center; font-family: Inter, system-ui, sans-serif;
}
.portal-upgrade-modal .plans-billing-toggle { position: relative; overflow: visible; display: inline-grid; grid-template-columns: repeat(2, minmax(112px, 1fr)); padding: 4px; border: 1px solid var(--pb-border); border-radius: 12px; background: var(--pb-surface); }
.portal-upgrade-modal .plans-billing-option { min-height: 44px; padding: .55rem 1.25rem; border: 0; border-radius: 9px; background: transparent; color: var(--pb-muted); font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.portal-upgrade-modal .plans-billing-option:hover { color: var(--pb-text); }
.portal-upgrade-modal .plans-billing-option[aria-pressed="true"] { background: var(--pb-brand); color: var(--pb-brand-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.portal-upgrade-modal .plans-billing-option:focus-visible { outline: 2px solid var(--pb-brand); outline-offset: 2px; }
.portal-upgrade-modal .plans-annual-discount { position: absolute; z-index: 3; top: -12px; right: -12px; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 22px; padding: 0 .55rem; overflow: hidden; border: 1px solid var(--pb-border); border-radius: 999px; background: var(--pb-surface); color: var(--pb-muted); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); font-size: 12px; font-weight: 700; line-height: 1; letter-spacing: .02em; white-space: nowrap; isolation: isolate; transition: color .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.portal-upgrade-modal .plans-annual-discount__label { position: relative; z-index: 1; }
.portal-upgrade-modal .plans-annual-discount::after { content: ""; position: absolute; z-index: 0; top: -80%; bottom: -80%; left: -75%; width: 48%; transform: skewX(-16deg) translate3d(-240%, 0, 0); background: linear-gradient(105deg, transparent 0%, color-mix(in srgb, white 10%, transparent) 30%, color-mix(in srgb, white 78%, transparent) 50%, color-mix(in srgb, white 10%, transparent) 70%, transparent 100%); opacity: 0; pointer-events: none; }
.portal-upgrade-modal .plans-billing[data-current-billing="yearly"] .plans-annual-discount { border-color: color-mix(in srgb, var(--pb-brand) 72%, var(--pb-border)); background: color-mix(in srgb, var(--pb-brand) 22%, var(--pb-surface)); color: var(--pb-text); box-shadow: 0 0 0 1px color-mix(in srgb, var(--pb-brand) 24%, transparent), 0 0 16px color-mix(in srgb, var(--pb-brand) 38%, transparent); }
.portal-upgrade-modal .plans-billing[data-current-billing="yearly"] .plans-annual-discount::after { opacity: .82; animation: plansAnnualSheen 3.6s linear infinite; }
@keyframes plansAnnualSheen { from { transform: skewX(-16deg) translate3d(-240%, 0, 0); } to { transform: skewX(-16deg) translate3d(470%, 0, 0); } }
@media (max-width: 575.98px) { .portal-upgrade-modal .plans-billing-toggle { width: min(100%, 320px); grid-template-columns: repeat(2, minmax(0, 1fr)); } .portal-upgrade-modal .plans-annual-discount { right: -8px; } }
@media (prefers-reduced-motion: reduce) { .portal-upgrade-modal .plans-annual-discount::after { animation: none; opacity: 0; } }
.portal-upgrade-modal .pu-billing { margin-top: 4px; }
.portal-upgrade-modal .pu-billing .plans-billing-toggle { width: 100%; }
.portal-upgrade-modal .pu-billing .plans-billing-option { min-height: 38px; font-size: 13px; }

/* Visuais do modal de bloqueio do Portal (aulas do curso e capa do indicador). */
.portal-upgrade-modal .pu-lessons, .portal-upgrade-modal .pu-cover { position: absolute; inset: 0; display: flex; flex-direction: column; }
.portal-upgrade-modal .pu-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 18px 16px; overflow: hidden; align-content: start; }
.portal-upgrade-modal .pu-l { margin: 0; border-radius: 10px; overflow: hidden; background: var(--v3-surface); border: 1px solid var(--v3-border); opacity: .55; transition: opacity .2s; }
.portal-upgrade-modal .pu-l.is-on { opacity: 1; border-color: var(--v3-brand); box-shadow: 0 0 0 1px var(--v3-brand) inset, 0 10px 30px -10px var(--v3-brand-line); }
.portal-upgrade-modal .pu-l img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.portal-upgrade-modal .pu-l figcaption { display: flex; gap: 6px; padding: 6px 8px; font: 600 .7rem/1.25 Inter, system-ui, sans-serif; color: var(--v3-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-upgrade-modal .pu-l figcaption b { color: var(--v3-brand); font-family: "JetBrains Mono", monospace; }
.portal-upgrade-modal .pu-cover__img { flex: 1; margin: 0 18px; border-radius: 12px; overflow: hidden; border: 1px solid var(--v3-border); background: #fff; display: grid; place-items: center; }
.portal-upgrade-modal .pu-cover__img img { width: 100%; height: 100%; object-fit: contain; }
.portal-upgrade-modal .pu-plat { display: flex; align-items: center; gap: 8px; padding: 12px 18px; font: 500 .74rem Inter, system-ui, sans-serif; color: var(--v3-muted); }
.portal-upgrade-modal .pu-plat img { width: 22px; height: 22px; border-radius: 5px; background: #fff; padding: 2px; }
@media (max-width: 860px) { .portal-upgrade-modal .pu-grid { grid-template-columns: repeat(4, 1fr); } .portal-upgrade-modal .pu-l figcaption { display: none; } .portal-upgrade-modal .pu-plat { display: none; } }

/* Bootstrap hosts the original, unmodified upgrade-v3 stylesheet.
   Billing and lesson visuals are ported from render/proposal.css. */
html:has(.portal-upgrade-modal.show) { overflow: hidden; }
.portal-upgrade-modal { padding-right: 0 !important; overflow: hidden; }
.portal-upgrade-modal .modal-dialog { max-width: 960px; }
body.portal-auth-body .portal-upgrade-modal .modal-content.v3-modal__panel {
  width: 100%; background: var(--v3-surface) !important; color: var(--v3-text) !important;
  border: 1px solid var(--v3-border) !important; border-radius: 20px !important; box-shadow: var(--v3-shadow) !important;
}
.portal-upgrade-modal [hidden] { display: none !important; }
.portal-upgrade-modal [aria-disabled="true"] { pointer-events: none; opacity: .65; }
.portal-upgrade-modal .pu-grid { overflow: auto; }
.portal-upgrade-modal .pu-l figcaption { white-space: normal; }
.portal-upgrade-modal .pu-l:has(img[hidden]) { min-height: 70px; }
.portal-upgrade-modal .portal-upgrade-items.is-cover { grid-template-columns: 1fr; }
.portal-upgrade-modal .portal-upgrade-items.is-cover .pu-l { opacity: 1; }
.portal-upgrade-modal .portal-upgrade-items.is-cover img { object-fit: contain; }
.portal-upgrade-modal .v3-plan__price span { white-space: normal; max-width: 14em; }
@media (max-width: 860px) {
  .portal-upgrade-modal .modal-dialog { margin: auto 0 0; max-width: none; min-height: 100%; display: flex; align-items: end; }
  body.portal-auth-body .portal-upgrade-modal .modal-content.v3-modal__panel { border-radius: 20px 20px 0 0 !important; }
  .portal-upgrade-modal .pu-l:has(img[hidden]) figcaption { display: flex; font-size: .62rem; }
}
