/* ==========================================================================
   PRIME AUDIOLOGY — 3D 360° MODEL VIEWER STYLES
   ========================================================================== */

.interactive-3d-card {
  background: radial-gradient(circle at 50% 30%, #1A2E4C 0%, #0A192F 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(10, 25, 47, 0.25);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.viewer-3d-header {
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 25, 47, 0.4);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.viewer-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewer-badge-3d {
  background: #0066FF;
  color: #FFFFFF;
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 0.92rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.viewer-canvas-container {
  width: 100%;
  height: 480px;
  min-height: 420px;
  position: relative;
  overflow: hidden;
  background: transparent;
  user-select: none;
}

/* Floating Hotspot Pins */
.hotspot-pin {
  position: absolute;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
}

.hotspot-pin:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.hotspot-dot {
  width: 12px;
  height: 12px;
  background: #0066FF;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 102, 255, 0.8);
  position: relative;
  z-index: 2;
}

.hotspot-pulse {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 102, 255, 0.4);
  animation: hotspotWave 2s infinite ease-out;
}

@keyframes hotspotWave {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Hotspot Info Drawer / Popup */
.hotspot-info-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  max-width: 380px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  color: #FFFFFF;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  z-index: 30;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

.hotspot-info-card.active {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hotspot-info-title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #93C5FD;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hotspot-info-desc {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #E2E8F0;
}

.hotspot-close-btn {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.hotspot-close-btn:hover {
  color: #FFFFFF;
}

/* 3D Viewer Toolbar & Color Switcher */
.viewer-3d-toolbar {
  padding: 16px 28px;
  background: rgba(10, 25, 47, 0.7);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  z-index: 10;
}

.viewer-colors-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-colors-label {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.color-swatch-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.2s, border-color 0.2s;
  padding: 0;
  position: relative;
}

/* 44x44px accessible touch target */
.color-swatch-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
}

.color-swatch-btn:hover {
  transform: scale(1.15);
}

.color-swatch-btn.active {
  border-color: #0066FF;
  transform: scale(1.15);
}

.viewer-button-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-ctrl-btn {
  background: #1E293B;
  color: #E2E8F0;
  border: 1px solid #334155;
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 8px;
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 1.0rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.viewer-ctrl-btn:hover {
  background: #334155;
  color: #FFFFFF;
}

.viewer-ctrl-btn.active {
  background: #0066FF;
  border-color: #0066FF;
  color: #FFFFFF;
}

/* 360 Drag Prompt Overlay */
.viewer-drag-hint {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 0.92rem;
  font-weight: 600;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  animation: pulseHint 3s infinite;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.5; }
}

@media (max-width: 768px) {
  .viewer-canvas-container {
    height: 380px;
  }
  .viewer-3d-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .viewer-button-group {
    width: 100%;
    flex-wrap: wrap;
  }
  .hotspot-info-card {
    left: 16px;
    right: 16px;
    max-width: none;
    bottom: 16px;
  }
}
