/* WatchmakerGallery41 - Styles v1.0.0 */

/* ── Wrapper ──────────────────────────────────────────────────────── */
.wmg41-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Georgia', serif;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Canvas Container ─────────────────────────────────────────────── */
.wmg41-canvas-wrapper {
  position: relative;
  width: 550px;
  max-width: 100%;
  max-height: 60vh;
  aspect-ratio: 1 / 1;
  background: #0a0a0e;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 4px #c89040,
    0 0 0 8px #6b4c1a,
    0 30px 80px rgba(0,0,0,.9),
    inset 0 0 60px rgba(0,0,0,.5);
  cursor: grab;
}

.wmg41-canvas-wrapper:active { cursor: grabbing; }

.wmg41-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.wmg41-canvas:focus-visible {
  box-shadow: 0 0 0 3px #c89040;
}

/* ── Loading ──────────────────────────────────────────────────────── */
.wmg41-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(10,10,14,.92);
  color: #c89040;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: opacity .5s ease;
  z-index: 10;
}

.wmg41-loading.wmg41-hidden {
  opacity: 0;
  pointer-events: none;
}

.wmg41-loading-gear svg {
  width: 48px;
  height: 48px;
  color: #c89040;
  animation: wmg41-spin 1.2s linear infinite;
}

@keyframes wmg41-spin {
  to { transform: rotate(360deg); }
}

/* ── Sound Toggle ─────────────────────────────────────────────────── */
.wmg41-sound-toggle {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 7px;
  background: rgba(10,10,14,.72);
  border: 1px solid rgba(200,144,64,.4);
  border-radius: 50%;
  color: #c89040;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
  z-index: 12;
}

.wmg41-sound-toggle:hover {
  background: rgba(200,144,64,.2);
  border-color: #c89040;
}

.wmg41-sound-toggle svg {
  width: 18px;
  height: 18px;
}

.wmg41-sound-toggle[aria-pressed="false"] .wmg41-icon-sound-off { display: none; }
.wmg41-sound-toggle[aria-pressed="true"]  .wmg41-icon-sound-on  { display: none; }

/* ── Lightbox ─────────────────────────────────────────────────────── */
.wmg41-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wmg41-lb-fadein .25s ease;
}

.wmg41-lightbox[hidden] { display: none; }

@keyframes wmg41-lb-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wmg41-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,5,8,.93);
  backdrop-filter: blur(6px);
}

.wmg41-lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 90vh;
  padding: 24px;
  background: #10100e;
  border-radius: 4px;
  z-index: 1;
}

/* Bridge-style frame */
.wmg41-lb-frame-bridge {
  border: 2px solid #c89040;
  box-shadow:
    0 0 0 6px rgba(200,144,64,.12),
    0 0 0 8px #c89040,
    0 0 60px rgba(200,144,64,.2);
}

.wmg41-lb-frame-bridge::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(200,144,64,.3);
  border-radius: 2px;
  pointer-events: none;
}

.wmg41-lb-frame-minimal {
  border: 1px solid rgba(200,144,64,.4);
}

.wmg41-lb-frame-classic {
  border: 3px solid #c89040;
  border-radius: 0;
}

.wmg41-lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #c89040;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  opacity: .7;
  transition: opacity .2s;
}

.wmg41-lightbox-close:hover { opacity: 1; }

.wmg41-lightbox-media {
  width: min(70vw, 700px);
  height: min(60vh, 600px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wmg41-lightbox-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
}

.wmg41-lightbox-media video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 2px;
}

/* Lightbox transition classes */
.wmg41-lb-transition-fade   { transition: opacity .3s ease; }
.wmg41-lb-transition-slide  { transition: transform .3s ease, opacity .3s ease; }
.wmg41-lb-transition-zoom   { transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .25s ease; }
.wmg41-lb-transition-precision { transition: transform .18s cubic-bezier(.4,0,.2,1), opacity .18s ease; }

.wmg41-lb-entering { opacity: 0; transform: scale(.95); }
.wmg41-lb-active   { opacity: 1; transform: scale(1); }
.wmg41-lb-leaving  { opacity: 0; transform: scale(1.04); }

/* Lightbox Nav */
.wmg41-lightbox-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c89040;
}

.wmg41-lb-prev,
.wmg41-lb-next {
  background: none;
  border: 1px solid rgba(200,144,64,.4);
  color: #c89040;
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
}

.wmg41-lb-prev:hover,
.wmg41-lb-next:hover {
  background: rgba(200,144,64,.15);
  border-color: #c89040;
}

.wmg41-lb-parts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 400px;
}

.wmg41-lb-part-btn {
  background: rgba(200,144,64,.1);
  border: 1px solid rgba(200,144,64,.3);
  color: #c89040;
  font-size: .72rem;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background .2s, border-color .2s;
}

.wmg41-lb-part-btn:hover,
.wmg41-lb-part-btn.wmg41-active {
  background: rgba(200,144,64,.3);
  border-color: #c89040;
}

.wmg41-lightbox-caption {
  color: rgba(200,144,64,.7);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  min-height: 1.2em;
}

/* ── Reduced Motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .wmg41-loading-gear svg { animation: none; }
  .wmg41-lightbox          { animation: none; }
  .wmg41-lb-transition-fade,
  .wmg41-lb-transition-slide,
  .wmg41-lb-transition-zoom,
  .wmg41-lb-transition-precision { transition: none; }
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .wmg41-canvas-wrapper {
    width: 100%;
    border-radius: 50%;
  }
  .wmg41-lightbox-media {
    width: 90vw;
    height: 55vw;
  }
}
