/* Translation-safe overlays. Loaded after the generated site stylesheet. */

.how-image-label,
.how-canvas-note,
.how-result-badge,
.how-result-scale {
    box-sizing: border-box;
    max-width: calc(100% - 1.7rem);
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}
.how-image-label .how-label-dot,
.how-result-badge svg,
.how-model-note span i {
    flex: none;
}
.how-model-note {
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
}
.how-model-note span,
.how-model-note small {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.35;
}
.how-visual-model {
    min-height: min-content;
    padding-block: 0.75rem;
}

/* Only an open proof popover releases the image/card crop. The images retain
   rounded corners, and the resting illustration keeps its existing animation. */
.how-proof-copy {
    visibility: hidden;
    white-space: normal;
}
.how-proof-tooltip:hover .how-proof-copy,
.how-proof-tooltip:focus-within .how-proof-copy {
    visibility: visible;
    pointer-events: auto;
}
.how-proof-copy::after {
    position: absolute;
    right: 0;
    bottom: 100%;
    width: 100%;
    height: 0.6rem;
    content: "";
}
.how-visual-result > img,
.hero-portrait-rotation > .hero-portrait-image {
    border-radius: inherit;
}
html:not(.localized-tooltips-ready) .how-section:has(.how-proof-tooltip:is(:hover, :focus-within)),
html:not(.localized-tooltips-ready) .how-step:has(.how-proof-tooltip:is(:hover, :focus-within)),
html:not(.localized-tooltips-ready) .how-visual-result:has(.how-proof-tooltip:is(:hover, :focus-within)),
html:not(.localized-tooltips-ready) .hero-visual:has(.how-proof-tooltip:is(:hover, :focus-within)) > .offer-frame,
html:not(.localized-tooltips-ready) .hero-portrait-rotation:has(.how-proof-tooltip:is(:hover, :focus-within)) {
    overflow: visible;
}
html:not(.localized-tooltips-ready) .how-section:has(.how-proof-tooltip:is(:hover, :focus-within)),
html:not(.localized-tooltips-ready) .how-step:has(.how-proof-tooltip:is(:hover, :focus-within)),
html:not(.localized-tooltips-ready) .hero-visual:has(.how-proof-tooltip:is(:hover, :focus-within)) {
    z-index: 5;
}
html:not(.localized-tooltips-ready) .how-visual-result:has(.how-proof-tooltip:is(:hover, :focus-within)) > img {
    transform: none;
}
html:not(.localized-tooltips-ready) .how-visual-result:has(.how-proof-tooltip:is(:hover, :focus-within))::after {
    visibility: hidden;
}

.award-winner-chip {
    box-sizing: border-box;
    left: 0;
    max-width: 100%;
}
.award-winner-chip > span:last-child {
    min-width: 0;
}
.award-winner-chip small,
.award-winner-chip strong {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

/* Feature rows provide a stable containing block at every card breakpoint. */
.plan-features > li,
.bundle-card ul > li {
    position: relative;
    min-width: 0;
}
.plan-tooltip {
    position: static;
}
.plan-tooltip-content {
    box-sizing: border-box;
    left: 50%;
    right: auto;
    bottom: calc(100% + 0.5rem);
    width: min(100%, 24rem);
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    transform: translate(-50%, 0.25rem);
}
.plan-tooltip-content::after {
    display: none;
}
.plan-tooltip-content::before {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0.6rem;
    content: "";
}
.plan-tooltip:hover .plan-tooltip-content,
.plan-tooltip:focus-within .plan-tooltip-content {
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.plan-card:has(.plan-tooltip:is(:hover, :focus-within)),
.bundle-card:has(.plan-tooltip:is(:hover, :focus-within)) {
    z-index: 5;
}
.how-proof-trigger:focus-visible,
.plan-tooltip-trigger:focus-visible {
    outline: 2px solid #7655c9;
    outline-offset: 3px;
}

/* Active tooltips are portaled to body so transformed cards cannot clip them. */
html.localized-tooltips-ready .how-proof-copy:not(.localized-floating-tooltip),
html.localized-tooltips-ready .plan-tooltip-content:not(.localized-floating-tooltip) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
body > .localized-floating-tooltip {
    position: fixed;
    inset: auto;
    z-index: 80;
    box-sizing: border-box;
    display: block;
    height: auto;
    margin: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    white-space: normal;
    overflow-wrap: anywhere;
    transition: none;
}
body > .localized-floating-tooltip::before,
body > .localized-floating-tooltip::after {
    display: none;
}
body > .localized-floating-tooltip:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

/* Keep the explicit Brazilian USD amount and billing unit together. */
html[lang="pt-BR"] .plan-price { flex-wrap: nowrap; }
html[lang="pt-BR"] .plan-price > span,
html[lang="pt-BR"] .plan-price small,
html[lang="pt-BR"] .bundle-price { white-space: nowrap; overflow-wrap: normal; flex-shrink: 0; }

/* Wrap between the billing period and seat allowance, never inside either phrase. */
html[lang] .plan-billing > .studio-billing-badge {
    display: inline-flex;
    flex-wrap: wrap;
    column-gap: 0.25em;
    white-space: normal;
    overflow-wrap: normal;
    text-align: left;
    border-radius: 0.85rem;
    /* Nested phrases shift the baseline; align to the top so Studio matches the other cards. */
    vertical-align: top;
}
.studio-billing-period, .studio-billing-seats {
    display: inline-block;
    white-space: nowrap;
    overflow-wrap: normal;
}
.studio-billing-badge > wbr { display: none; }

/* Center both single-line and wrapped billing copy within the badge's minimum height. */
html[lang] .plan-billing > span {
    display: inline-flex;
    align-items: center;
    align-content: center;
}
