/* ==========================================================================
   INTERACTIVE ROOM & SURFACE VISUALIZER STYLING
   Mangaldeep Marble Pvt. Ltd. (mangaldeepmarble.com)
   ========================================================================== */

.visualizer-section {
  padding: 7rem 0;
  background: #0d0f15;
  border-top: 1px solid var(--border-gold);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.visualizer-studio {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), var(--shadow-gold);
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 640px;
}

/* Studio Canvas Viewport */
.studio-viewport-col {
  display: flex;
  flex-direction: column;
  background: #080a0e;
  border-right: 1px solid var(--border-subtle);
  position: relative;
}

.viewport-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: rgba(17, 20, 28, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.scene-selector-pills {
  display: flex;
  gap: 0.5rem;
}

.scene-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.scene-btn:hover {
  border-color: var(--border-gold);
  color: var(--text-primary);
}

.scene-btn.active {
  background: var(--gold-subtle);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.viewport-controls-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.visualizer-canvas-container {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 480px;
  background: #05070a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#roomVisualizerCanvas {
  width: 100%;
  height: 100%;
  max-height: 540px;
  display: block;
}

/* Canvas Overlay UI */
.viewport-floating-badges {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.active-stone-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-gold);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.active-stone-pill .stone-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #fff;
}

.viewport-lighting-bar {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.25rem;
  z-index: 5;
}

.lighting-presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lighting-label {
  font-size: 0.775rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.light-btn {
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.light-btn:hover {
  border-color: var(--border-gold);
  color: var(--text-primary);
}

.light-btn.active {
  background: var(--gold-subtle);
  border-color: var(--gold-light);
  color: var(--gold-light);
  font-weight: 700;
}

.finish-toggle-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.finish-btn {
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

.finish-btn.active {
  background: var(--gold-gradient);
  color: #0b0d12;
  font-weight: 700;
  border-color: transparent;
}

/* Visualizer Controls Sidebar */
.studio-sidebar-col {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  height: 100%;
}

.sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.surface-target-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.surface-tab-btn {
  padding: 0.5rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.surface-tab-btn:hover {
  border-color: var(--border-gold);
}

.surface-tab-btn.active {
  background: var(--gold-subtle);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.swatch-filter-strip {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.swatch-cat-chip {
  padding: 0.3rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.725rem;
  white-space: nowrap;
  cursor: pointer;
}

.swatch-cat-chip.active {
  background: var(--gold-subtle);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.swatches-scroll-container {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  max-height: 380px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.stone-swatch-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stone-swatch-item:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.stone-swatch-item.active {
  border-color: var(--gold-light);
  background: var(--gold-subtle);
  box-shadow: 0 0 12px rgba(197, 160, 89, 0.3);
}

.swatch-preview-box {
  width: 100%;
  height: 70px;
  border-radius: 4px;
  overflow: hidden;
  background: #111;
}

.swatch-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.swatch-info h6 {
  font-size: 0.75rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.swatch-info p {
  font-size: 0.7rem;
  color: var(--gold-light);
  font-weight: 700;
}

.sidebar-footer-actions {
  padding: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Responsive adjustments for Visualizer Studio */
@media (max-width: 1024px) {
  .visualizer-studio {
    grid-template-columns: 1fr;
  }
  .studio-viewport-col {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .swatches-scroll-container {
    max-height: 260px;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}
