/* AWS image viewer (assets/js/viewer.js). */
.awv-zoomable { cursor: zoom-in; }
.awv-zoomable:focus-visible { outline: 3px solid var(--aws-coral); outline-offset: 3px; }
.awv-ico { position: absolute; z-index: 3; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(10, 22, 40, .66); box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); pointer-events: none; opacity: .82; transition: opacity .2s var(--aws-ease), transform .2s var(--aws-ease); }
.awv-ico.is-sm { width: 26px; height: 26px; }
.awv-ico.is-sm svg { width: 12px; height: 12px; }
html.awv-lock, html.awv-lock body { overflow: hidden; }

.awv { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: #E8EDF5; background: #070D18; display: none; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); overflow: hidden; box-sizing: border-box; font-family: inherit; }
.awv[open] { display: grid; animation: awv-in .18s ease-out; }
.awv::backdrop { background: #070D18; }
@keyframes awv-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .awv[open] { animation: none; } .awv-ico { transition: none; } }

.awv-top { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem clamp(.75rem, 2vw, 1.5rem); border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(10, 22, 40, .9); }
.awv-meta { min-width: 0; display: flex; align-items: baseline; gap: 1rem; }
.awv-ctx { margin: 0; font: 500 .74rem/1.3 var(--aws-mono); letter-spacing: .12em; text-transform: uppercase; color: #C9D3E2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.awv-count { margin: 0; font: 500 .74rem/1.3 var(--aws-mono); letter-spacing: .08em; color: #8FA0B8; white-space: nowrap; }
.awv-tools { display: flex; align-items: center; gap: .35rem; flex: none; }
.awv-pct { min-width: 4.6rem; text-align: center; font: 500 .72rem/1 var(--aws-mono); letter-spacing: .06em; color: #C9D3E2; }
.awv-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 44px; height: 44px; padding: 0 .7rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: #fff; font: 500 .85rem/1 inherit; cursor: pointer; }
.awv-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.awv-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.awv-btn:focus-visible { outline: 3px solid var(--aws-coral); outline-offset: 2px; }
.awv-btn:disabled { opacity: .35; cursor: default; }
.awv-close { margin-left: .5rem; background: rgba(235, 103, 107, .16); border-color: rgba(235, 103, 107, .55); }

.awv-stage { position: relative; overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.awv-stage.is-zoomed { cursor: grab; }
.awv-stage.is-zoomed.is-grab { cursor: grabbing; }
.awv-holder { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.awv-holder > img, .awv-holder > svg { display: block; width: 100%; height: 100%; max-width: none; image-rendering: auto; }
.awv-holder > svg { background: #fff; }
.awv-spin { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .18); border-top-color: var(--aws-coral); opacity: 0; animation: awv-spin .8s linear infinite; pointer-events: none; }
.awv-stage.is-loading .awv-spin { opacity: 1; }
@keyframes awv-spin { to { transform: rotate(360deg); } }

.awv-nav { position: absolute; top: 50%; width: 48px; height: 64px; margin-top: -32px; border-radius: 12px; background: rgba(10, 22, 40, .72); z-index: 2; }
.awv-nav svg { width: 22px; height: 22px; }
.awv-prev { left: clamp(.5rem, 1.5vw, 1.25rem); }
.awv-next { right: clamp(.5rem, 1.5vw, 1.25rem); }
.awv-nav[hidden] { display: none; }

.awv-cap { max-height: 28vh; overflow: auto; padding: .9rem clamp(1rem, 4vw, 3rem) 1.1rem; border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(10, 22, 40, .9); font-size: .9rem; line-height: 1.55; color: #D6DEEA; text-align: center; }
.awv-cap[hidden] { display: none; }
.awv-cap-p { max-width: 62rem; margin: 0 auto; }
.awv-cap-p + .awv-cap-p { margin-top: .45rem; color: #B9C5D6; font-size: .84rem; }
.awv-cap * { color: inherit !important; font-size: inherit !important; text-align: inherit !important; margin: 0 !important; background: none !important; }
.awv-cap strong, .awv-cap b { color: #fff !important; }
.awv-cap a { text-decoration: underline; }
.awv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
	.awv-top { flex-wrap: wrap; padding: .5rem .6rem; gap: .4rem; }
	.awv-meta { width: 100%; justify-content: space-between; }
	.awv-tools { width: 100%; justify-content: space-between; gap: .25rem; }
	.awv-btn { min-width: 42px; padding: 0 .55rem; }
	.awv-pct { min-width: 0; flex: 1; }
	.awv-close span { display: none; }
	.awv-nav { width: 40px; height: 52px; margin-top: -26px; }
	.awv-cap { font-size: .84rem; max-height: 30vh; text-align: left; }
}
