/* Colour viewer (sections/metal-color-viewer.php, assets/js/metal-color-viewer.js), 2026-11-21. */
.cv { --cv-maroon: #800000; --cv-ink: #111; border-radius: .9rem; overflow: hidden; background: #fff;
      box-shadow: 0 14px 34px rgba(17, 20, 26, .16); }
.cv-stage { position: relative; background: #eceef2; }
.cv-stage > .cv-img, .cv-stage > .cv-spin { object-fit: cover; }
.cv-stage > .cv-spin { z-index: 1; }
.cv-stage > .cv-hot, .cv-stage > .cv-pop, .cv-stage > .cv-360 { width: auto; height: auto; }   /* undo .ratio > * sizing */

.cv-360 { position: absolute; right: .75rem; bottom: .75rem; left: auto; top: auto; z-index: 4; border: 0; border-radius: 999px;
    background: rgba(17, 17, 17, .82); color: #fff; font-size: .8rem; font-weight: 700; padding: .4rem .8rem;
    display: inline-flex; align-items: center; gap: .35rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.cv-360[aria-pressed="true"] { background: var(--cv-maroon); }

.cv-hot { position: absolute; z-index: 3; transform: translate(-50%, -50%); width: 30px !important; height: 30px !important;
    border-radius: 50%; border: 2px solid #fff; background: var(--cv-maroon); color: #fff; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: .9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .35); cursor: pointer; transition: transform .15s ease; }
.cv-hot:hover, .cv-hot[aria-expanded="true"] { transform: translate(-50%, -50%) scale(1.12); }
.cv.pulse .cv-hot { animation: cvPulse 1.6s ease-out 3; }
@keyframes cvPulse { 0% { box-shadow: 0 0 0 0 rgba(128, 0, 0, .55); } 100% { box-shadow: 0 0 0 16px rgba(128, 0, 0, 0); } }
.cv.spinning .cv-hot, .cv.spinning .cv-pop { display: none; }

.cv-pop { position: absolute; z-index: 5; transform: translateX(-50%); max-width: 260px !important; background: #fff;
    border-radius: .6rem; padding: .7rem .85rem; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); font-size: .85rem; }
.cv-pop.above { transform: translate(-50%, -100%); }
.cv-pop-title { font-weight: 800; color: var(--cv-ink); margin-bottom: .2rem; }
.cv-pop-text { color: #4a4a4a; line-height: 1.4; }

.cv-bar { padding: .85rem 1rem 1rem; }
.cv-caption { font-size: .9rem; font-weight: 700; color: var(--cv-ink); margin-bottom: .6rem; min-height: 1.2em; }
.cv-strip { display: flex; flex-wrap: wrap; gap: .4rem; }
.cv-chip { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #c9c9c9;
    background: linear-gradient(180deg, var(--roof) 0 40%, var(--wall) 40% 100%); cursor: pointer; }
.cv-chip.on { box-shadow: 0 0 0 2px var(--cv-maroon); }
.cv-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }

@media (prefers-reduced-motion: reduce) { .cv.pulse .cv-hot { animation: none; } }
