html.sv-photo-viewer-open { overflow: hidden; scrollbar-gutter: stable; }
.sv-photo-viewer[open] {
    display: grid; grid-template-rows: auto minmax(0, 1fr);
    width: min(calc(100% - 16px), 1080px); height: min(calc(100dvh - 16px), 1020px);
    max-width: none; max-height: none; padding: 0; border: 0;
    color: #28382f; background: #f8f6f1;
}
.sv-photo-viewer::backdrop { background: #17231ce8; }
.sv-photo-viewer-header { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 12px 14px 16px; }
.sv-photo-viewer-header h2 { flex: 1 1 14em; font-size: 1rem; line-height: 1.2; margin: 0; }
.sv-photo-viewer-actions { display: flex; gap: 8px; margin: 0 0 0 auto; }
.sv-photo-viewer-actions button { min-width: 92px; min-height: 44px; --btn-padding: 6px 12px; }
.sv-photo-viewer-actions .btn-color-primary { --btn-color: #212121; --btn-color-hover: #212121; }
.sv-photo-viewer-actions button:focus-visible { outline: 2px solid #28382f; outline-offset: 1px; }
.sv-photo-viewer-image { position: relative; overflow: hidden; overscroll-behavior: contain; background: #eae7df; }
.sv-photo-viewer-image img {
    display: block; position: relative; width: 100%; height: 100%; margin-inline: auto; object-fit: contain;
    max-width: var(--sv-photo-native-width, 100%);
}
.sv-photo-viewer-image img[hidden] { display: none; }
.sv-photo-viewer:not([data-zoomed]) .sv-photo-viewer-image > img:not([hidden]) {
    position: absolute; inset: 0; margin: auto; max-height: var(--sv-photo-native-height, 100%);
}
.sv-photo-viewer[data-zoomed] .sv-photo-viewer-image { overflow: auto; }
.sv-photo-viewer[data-zoomed] .sv-photo-viewer-image img { width: 200%; height: auto; }
.sv-photo-viewer-image:has(.sv-photo-viewer-drawings:not([hidden])) { overflow: auto; }
.sv-photo-viewer-drawings:not([hidden]) { display: grid; gap: 8px; padding: 8px; box-sizing: border-box; }
.sv-photo-viewer-drawings .sv-planner-elevation { background: #f8f6f1; }
.sv-photo-viewer-drawings .sv-planner-elevation figcaption { color: #28382f; font-size: .9375rem; }
.sv-photo-viewer-drawings .sv-planner-elevation svg { display: block; width: 100%; height: auto; max-height: 440px; }
.sv-photo-viewer[data-zoomed] .sv-photo-viewer-drawings { width: 200%; }
.sv-photo-viewer[data-zoomed] .sv-photo-viewer-drawings svg { max-height: none; }
.sv-photo-viewer-drawings .sv-photo-viewer-plan { padding: 10px; background: #f8f6f1; }
.sv-photo-viewer-plan figcaption { color: #28382f; }
.sv-photo-viewer-plan .sv-planner-top { width: 100%; height: auto; max-height: 58dvh; }
.sv-photo-viewer-drawings .sv-free-plan-results { padding: 0 12px; }
.sv-photo-viewer[data-zoomed] :is(.sv-photo-viewer-plan figcaption, .sv-photo-viewer-drawings .sv-free-plan-results) {
    position: sticky; left: 8px; width: 50%; box-sizing: border-box;
}
.sv-photo-viewer-status { position: absolute; inset: 0 0 auto; margin: 0; padding: 10px; background: #f8f6f1; }

.sv-module-product .sv-product-image > a[data-sv-photo-viewer-link] { display: block; color: #28382f; }
.sv-module-product .sv-product-image > a[data-sv-photo-viewer-link]:focus-visible { outline: 2px solid #28382f; outline-offset: -3px; }
.sv-module-photo-caption { display: flex; justify-content: center; margin: 14px 0; }

.sv-module-catalog .sv-module-photo-link { position: relative; display: block; }
.sv-module-catalog .sv-module-photo-link:focus-visible { outline: 2px solid #28382f; outline-offset: -3px; }
.sv-module-catalog .sv-module-card-link { display: block; color: inherit; }
.sv-module-catalog .sv-module-card-link:hover h3 { text-decoration: underline; }
.sv-module-photo-enlarge { margin: 12px 0 0; }
