/* <bredatag-room-view> "View in your room": the button in a page's bar, the box it opens, and the page a phone opens.

   One file for three places. The Designer's page has its own colors (its variables: --text, --muted, --line,
   --control, --panel-solid ...) and no theme stylesheet; the phone page stands in the shop's theme. Every color here
   takes the Designer's variable where there is one and a value of the brand's own (breda/docs/brand) where not. */

/* ---- the button in the Designer. The page gives it two places (its designer.css: "room for another module's tool"):
        in the bar beside "AI", and on the picture of a phone or tablet. The one that fits the layout is shown: the
        Designer's "compact" layout begins under 1100px wide or 600px high. */
.rmv-tool { display: contents; }      /* the button stands in the bar itself; its box and script take no place there */
.rmv-open { display: inline-flex; align-items: center; gap: 6px; border: 0; font: inherit; font-weight: 750; font-size: 13px; line-height: 20px; letter-spacing: .03em; white-space: nowrap; color: var(--text, #1c1917); cursor: pointer; }
.rmv-open svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--focus, #c2410c); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.rmv-open:disabled { opacity: .45; cursor: default; }
.rmv-open-bar { margin: 0 2px; padding: 8px 12px 8px 9px; border-radius: 10px; background: var(--control, #f5f5f4); transition: background-color .2s; }
@media (hover: hover) { .rmv-open-bar:hover:not(:disabled) { background: var(--control-hover, #e7e5e4); } }
@media (prefers-reduced-motion: reduce) { .rmv-open-bar { transition: none; } }
@media (max-width: 1099px), (max-height: 599px) { .rmv-open-bar { display: none; } }
/* On the picture it stands last in the Designer's row of tools, after "Share" and "AI", and looks as they do (its
   .sharebtn, .aipic): the same height, panel and rim. The Designer makes what is left of the row a container
   (.tools-extra), and the button shows what fits it: the letters "AR" alone (a narrow phone), the letters with the
   picture (a phone), the words in full (135 px and more: a tablet, a wide phone). The words stay the button's name
   for a screen reader whichever is shown. */
.rmv-open-picture { justify-content: center; gap: 4px; height: 42px; min-width: 44px; padding: 0; border-radius: 11px; background: var(--panel, #f5f5f4); border: 1px solid var(--line, #d6d3d1); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.rmv-open-picture svg { display: none; width: 19px; height: 19px; }
.rmv-open-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (pointer: coarse) { .rmv-open-picture { height: 44px; } }
@container (min-width: 61px) {
  .rmv-open-picture { padding: 0 10px 0 7px; }
  .rmv-open-picture svg { display: block; }
}
@container (min-width: 135px) {
  .rmv-open-picture { gap: 6px; padding: 0 12px 0 9px; }
  .rmv-open-long { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .rmv-open-short { display: none; }
}

/* ---- the button on a product page. On the gallery's photo it is a pill, under the dark "View in the Designer" (the
        Designer module's template places it); under Add to Cart it is a link, as the one beside it. */
.rmv-open-photo { min-height: 44px; padding: 0 16px 0 13px; gap: 8px; border-radius: 999px; background: rgba(255, 255, 255, .96); color: #1c1917; font-size: 14px; font-weight: 600; letter-spacing: 0; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .55); transition: background-color .2s; }
.rmv-open-photo svg { width: 18px; height: 18px; stroke: #c2410c; stroke-width: 2; }
@media (hover: hover) { .rmv-open-photo:hover:not(:disabled) { background: #fff7ed; } }
.rmv-open-photo:focus-visible { outline: 2px solid #1c1917; outline-offset: 2px; }
.rmv-open-link { min-height: 44px; padding: 0; gap: 8px; background: none; color: #9a3412; font-size: 15px; font-weight: 600; letter-spacing: 0; text-decoration: underline; text-underline-offset: 2px; }
.rmv-open-link svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; }
@media (hover: hover) { .rmv-open-link:hover:not(:disabled) { color: #7c2d12; } }
.rmv-open-link:focus-visible { outline: 2px solid #9a3412; outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .rmv-open-photo { transition: none; } }

/* ---- a box of its own, for a page of the shop (the Designer lends its own: see below). The same corners, the x in
        the same corner, the content scrolling inside them. */
dialog.rmv-box { position: fixed; inset: 0; margin: auto; border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); height: fit-content; max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: hidden; background: #fbfaf7; color: #1c1917; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
dialog.rmv-box[open] { display: flex; flex-direction: column; }
dialog.rmv-box::backdrop { background: rgba(28, 25, 23, .55); }
.rmv-box-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 22px 22px; }
.rmv-box-x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #1c1917; cursor: pointer; }
.rmv-box-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
@media (hover: hover) { .rmv-box-x:hover { background: #efede9; } }
.rmv-box-x:focus-visible { outline: 2px solid #1c1917; outline-offset: 2px; }
@media (max-width: 480px) { .rmv-box-body { padding: 22px 18px 20px; } }

/* ---- the box: the Designer's own (its .about), so it is the same as that page's other boxes; only what is this one's */
.rmv-dialog .rmv-title { padding-right: 44px; }      /* the box's x stands beside it */
.rmv-dialog .rmv-title:focus { outline: none; }      /* the place reading starts when the content arrives; not a control */
.rmv-dialog .rmv-foot { display: none; }      /* "Change this design": the Designer is right behind the box */
.rmv-wait { margin: 0; padding: 4px 40px 4px 0; }

/* ---- the page a phone opens */
.rmv-page { max-width: 40rem; margin: 0 auto; padding: 8px 0 40px; }

/* ---- one design's content, in the box and on the page */
.rmv { display: grid; gap: 20px; font-size: 15px; line-height: 1.5; color: var(--text, #1c1917); text-align: left; }
.rmv p, .rmv dl, .rmv dd, .rmv ol, .rmv ul, .rmv fieldset { margin: 0; padding: 0; }
.rmv a { color: var(--focus, #c2410c); text-decoration: underline; text-underline-offset: 2px; }
.rmv-title { margin: 0; font-family: var(--font-display, inherit); font-weight: 700; font-size: 24px; line-height: 1.15; letter-spacing: .01em; }
.rmv .rmv-bed { margin-top: 6px; }
.rmv-bed strong { display: block; font-weight: 700; }
.rmv-bed span { display: block; color: var(--muted, #57534e); font-size: 14px; }
.rmv .rmv-sub { margin: 0 0 8px; font-size: 15px; font-weight: 750; line-height: 1.3; }

.rmv-alert { padding: 14px 16px; border: 2px solid #c2410c; border-radius: 12px; background: #fff7ed; color: #1c1917; }
.rmv-alert strong { display: block; margin-bottom: 4px; }

/* open or closed: two large choices side by side */
.rmv-ar { display: grid; gap: 14px; }
/* the bed, turning under a finger, where an Android browser makes it ready for its own camera view */
.rmv-preview { height: 210px; border-radius: 12px; background: #efede9; overflow: hidden; }
.rmv-preview model-viewer { display: block; width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.rmv-go:disabled { opacity: .6; cursor: default; }
.rmv-pos { border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rmv-pos legend { grid-column: 1 / -1; padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.rmv-pos label { position: relative; display: block; cursor: pointer; }
.rmv-pos input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rmv-pos span { display: block; padding: 12px 10px; border: 2px solid var(--line, #d6d3d1); border-radius: 12px; text-align: center; font-weight: 700; }
.rmv-pos input:checked + span { border-color: var(--focus, #c2410c); background: #fff7ed; color: #1c1917; }
.rmv-pos input:focus-visible + span { outline: 3px solid var(--focus, #c2410c); outline-offset: 2px; }

.rmv-go { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 14px 18px; border: 0; border-radius: 14px; background: #c2410c; color: #fff; font: inherit; font-size: 18px; font-weight: 750; line-height: 1.2; cursor: pointer; }
.rmv-go svg { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.rmv-go:hover { background: #9a3412; }
.rmv-go:focus-visible { outline: 3px solid #1c1917; outline-offset: 3px; }
.rmv-said { min-height: 0; font-weight: 700; }
.rmv-said:empty { display: none; }
.rmv .rmv-true { color: var(--muted, #57534e); font-size: 14px; }

.rmv-steps { list-style: none; counter-reset: rmv-step; display: grid; gap: 10px; }
.rmv-steps li { counter-increment: rmv-step; display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; }
.rmv-steps li::before { content: counter(rmv-step); grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--on, #1c1917); color: var(--on-text, #fff); font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.rmv-steps strong { display: block; }

/* the way to a phone: the code beside its words; under them on a narrow box */
.rmv-qr { display: grid; grid-template-columns: 172px 1fr; gap: 18px; align-items: center; }
.rmv-qr[hidden], .rmv-ar[hidden] { display: none; }
.rmv-code { width: 172px; height: 172px; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line, #e7e5e4); }
.rmv-code svg { display: block; width: 100%; height: 100%; }
.rmv-qr-words p + p { margin-top: 8px; }
.rmv .rmv-needs { color: var(--muted, #57534e); font-size: 13.5px; }
@media (max-width: 460px) { .rmv-qr { grid-template-columns: 1fr; justify-items: start; } }

.rmv-link label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.rmv-link-row { display: flex; gap: 8px; }
.rmv-link input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--rim, #a8a29e); border-radius: 10px; background: #fff; color: #1c1917; font: inherit; font-size: 14px; text-overflow: ellipsis; }
.rmv-copy { flex: none; min-width: 108px; padding: 10px 14px; border: 0; border-radius: 10px; background: var(--on, #1c1917); color: var(--on-text, #fff); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.rmv-copy:focus-visible, .rmv-link input:focus-visible { outline: 3px solid var(--focus, #c2410c); outline-offset: 2px; }
/* a computer's part is the way to a phone: what the lines mean and what the model leaves out is said there, where they are seen */
.rmv[data-device="other"] .rmv-lines, .rmv[data-device="other"] .rmv-notes { display: none; }
/* a phone that has the camera view needs no link to itself */
.rmv[data-device="ios"] .rmv-link, .rmv[data-device="android"] .rmv-link { display: none; }

.rmv-lines, .rmv-dims { padding-top: 18px; border-top: 1px solid var(--line, #e7e5e4); }
.rmv-lines dl { display: grid; gap: 10px; }
.rmv-lines dt { font-weight: 700; }
.rmv-lines dt::before { content: ""; display: inline-block; width: 18px; height: 4px; margin-right: 8px; border-radius: 2px; background: #eb690b; vertical-align: middle; }
.rmv-lines p { margin-top: 12px; }
/* the measurements: one to a line, the number at the right, as the Designer lists a bed's dimensions */
.rmv-dims dl { border-top: 1px solid var(--line, #e7e5e4); }
.rmv-dims dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line, #e7e5e4); }
.rmv-dims dt { color: inherit; }
.rmv-dims dd { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.rmv-notes { list-style: none; display: grid; gap: 4px; color: var(--muted, #57534e); font-size: 13.5px; }
.rmv .rmv-beta { padding-top: 14px; border-top: 1px solid var(--line, #e7e5e4); color: var(--muted, #57534e); font-size: 13.5px; }
.rmv-beta b { color: var(--text, #1c1917); }
.rmv .rmv-guide { font-size: 13.5px; font-weight: 650; color: var(--text, #1c1917); }
.rmv-foot { font-weight: 700; }
