html.rm-purchased-open { overflow: hidden; }
/* Native button semantics for the flag/title; description and totals remain plain content. */
.rm-purchased-title-button { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; max-width: 100%; padding: 4px 0; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rm-purchased-title-button img { flex-shrink: 0; }
.rm-purchased-title-text { min-width: 0; overflow-wrap: anywhere; }
.rm-purchased-title-button .rm-purchased-info-icon { display: inline-block; vertical-align: -2px; width: 16px; height: 16px; margin-left: 6px; fill: none; stroke: var(--rm-home-primary-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rm-purchased-title-button:hover, .rm-purchased-title-button:focus-visible { color: var(--rm-home-primary-strong); }
.rm-purchased-title-button:hover .rm-purchased-title-text, .rm-purchased-title-button:focus-visible .rm-purchased-title-text { text-decoration: underline; text-underline-offset: 3px; }
.rm-purchased-title-button:focus-visible { outline: 2px solid var(--rm-home-primary); outline-offset: 3px; }
:is(.rm-order-success-product-copy, .rm-orders-product-copy):has(.rm-purchased-title-button img:not([hidden])) > p { margin-left: 48px; }
/* Narrow receipt columns keep the title full-width and the amount below it. */
.rm-order-success-products, [data-order-products] { container-type: inline-size; container-name: purchased-products; }
@container purchased-products (max-width: 520px) {
    .rm-order-success-product, .rm-orders-product { grid-template-columns: minmax(0,1fr); }
    .rm-order-success-product-amount, .rm-orders-product-price { text-align: left; }
}
.rm-purchased-trigger { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 0 14px; border: 1px solid var(--rm-home-border-defined); border-radius: 10px; color: var(--rm-home-primary-strong); background: var(--rm-home-surface); font-size: var(--rm-type-body); font-weight: 650; cursor: pointer; }
.rm-purchased-trigger:hover, .rm-purchased-close:hover { background: var(--rm-home-primary-soft); }
.rm-purchased-dialog { width: min(860px, calc(100% - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid var(--rm-home-border-defined); border-radius: var(--rm-home-radius); background: var(--rm-home-surface); color: var(--rm-home-text); box-shadow: var(--rm-home-shadow); overflow: hidden; font-size: var(--rm-type-body); }
.rm-purchased-dialog::backdrop { background: rgba(20, 29, 48, .48); }
.rm-purchased-dialog [hidden] { display: none !important; }
.rm-purchased-shell { display: flex; flex-direction: column; max-height: min(840px, calc(100vh - 64px)); max-height: min(840px, calc(100dvh - 64px)); }
.rm-purchased-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--rm-home-border-defined); }
.rm-purchased-head h2 { margin: 0; font-size: var(--rm-type-section-title); font-weight: 750; }
.rm-purchased-close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.rm-purchased-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.rm-purchased-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 28px 28px; scrollbar-gutter: stable; }
.rm-purchased-summary h3 { margin: 0; font-size: var(--rm-type-card-large); font-weight: 750; }
.rm-purchased-summary p, .rm-purchased-help { margin: 8px 0 0; line-height: 1.65; }
.rm-purchased-dialog h3, .rm-purchased-dialog p, .rm-purchased-dialog li, .rm-purchased-dialog dd { overflow-wrap: anywhere; }
.rm-purchased-caption, .rm-purchased-help { color: var(--rm-home-text-tertiary); font-size: var(--rm-type-support); }
.rm-purchased-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.rm-purchased-spec { min-width: 0; border: 1px solid var(--rm-home-border-defined); border-radius: 12px; padding: 14px; }
.rm-purchased-spec dt { display: flex; align-items: center; gap: 8px; color: var(--rm-home-text-secondary); font-size: var(--rm-type-support); }
.rm-purchased-spec svg { flex: none; width: 20px; height: 20px; stroke: var(--rm-home-primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rm-purchased-spec dd { margin: 8px 0 0; font-weight: 650; }
.rm-purchased-countries { padding: 0; list-style: none; }
.rm-purchased-countries:not(.is-expanded) > li:nth-child(n+5) { display: none; }
.rm-purchased-more { cursor: pointer; }
.rm-purchased-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.rm-purchased-more.is-short { display: none; }
.rm-purchased-terms ul, .rm-purchased-terms ol { list-style: none; padding: 0; margin: 0; }
.rm-purchased-terms a { text-decoration: underline; color: var(--rm-home-primary-strong); }
.rm-purchased-footer { flex: none; padding: 12px 28px; border-top: 1px solid var(--rm-home-border-defined); display: flex; justify-content: flex-end; }
.rm-purchased-done { min-width: 100px; min-height: 44px; border: 0; border-radius: 10px; background: var(--rm-home-primary); color: #fff; font-weight: 650; cursor: pointer; }
.rm-purchased-done:hover { background: var(--rm-home-primary-strong); }
.rm-purchased-trigger:focus-visible, .rm-purchased-dialog :focus-visible { outline: 2px solid var(--rm-home-primary); outline-offset: 3px; }
@media (max-width: 767px) {
    .rm-purchased-title-button { gap: 10px; }
    :is(.rm-order-success-product-copy, .rm-orders-product-copy):has(.rm-purchased-title-button img:not([hidden])) > p { margin-left: 38px; }
    .rm-purchased-dialog { width: calc(100% - 24px); border-radius: 16px; }
    .rm-purchased-shell { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
    .rm-purchased-head { padding: 10px 16px; }
    .rm-purchased-scroll { padding: 20px 16px 24px; }
    .rm-purchased-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .rm-purchased-spec { padding: 12px; }
    .rm-purchased-countries:not(.is-expanded) > li:nth-child(n+3) { display: none; }
    .rm-purchased-more.is-short { display: flex; }
    .rm-purchased-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
    .rm-purchased-done { width: 100%; }
}
