/* COLORING & DRAWING STUDIO STYLES */

.studio-wrapper {
  display: flex;
  height: calc(100vh - 130px);
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #080B11;
}

/* --- SIDEBAR TOOLBAR --- */

.studio-sidebar {
  width: 320px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 20px;
  overflow-y: auto;
  z-index: 20;
}

.studio-section-title {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Current Color & Custom Color Picker */
.active-color-display-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.active-swatch-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.custom-picker-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.custom-picker-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.color-input-field {
  -webkit-appearance: none;
  border: none;
  width: 100%;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}

.color-input-field::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-input-field::-webkit-color-swatch {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

/* Palette Presets Selector */
.palette-preset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.palette-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.palette-tab-btn:hover, .palette-tab-btn.active {
  background: var(--gold-gradient);
  color: #0F172A;
  border-color: var(--gold-primary);
}

.palette-swatches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.palette-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, border-color 0.15s;
}

.palette-swatch:hover {
  transform: scale(1.12);
}

.palette-swatch.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  transform: scale(1.08);
}

/* Tool Buttons Group */
.studio-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.studio-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-tool-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold-primary);
}

.studio-tool-btn.active {
  background: rgba(229, 184, 66, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

/* History Actions */
.history-btns-row {
  display: flex;
  gap: 8px;
}

.history-btns-row .btn {
  flex: 1;
  padding: 8px;
  font-size: 0.8rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-btns-row .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  box-shadow: none;
}

.history-btns-row .btn:not(:disabled) {
  opacity: 1;
  cursor: pointer;
  border-color: var(--gold-primary);
  background: rgba(229, 184, 66, 0.15);
  color: var(--gold-light);
  box-shadow: 0 0 10px rgba(229, 184, 66, 0.15);
}

.history-btns-row .btn:not(:disabled):hover {
  background: var(--gold-gradient);
  color: #0F172A;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 184, 66, 0.3);
}

/* --- CANVAS VIEWPORT --- */

.studio-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #0D111A;
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(19, 26, 41, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.studio-title-group h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--text-main);
}

.studio-title-group p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.studio-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.studio-viewport {
  width: 820px;
  height: 820px;
  max-width: 90%;
  max-height: 90%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(229, 184, 66, 0.08);
}

.studio-viewport svg {
  width: 100%;
  height: 100%;
}

.mandala-shape {
  cursor: pointer;
  transition: filter 0.15s, opacity 0.15s;
}

.mandala-shape:hover {
  filter: brightness(1.1) drop-shadow(0 0 4px rgba(229, 184, 66, 0.6));
}

/* Floating Zoom Navigator */
.floating-zoom-controls {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lux);
  z-index: 10;
}

.zoom-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.zoom-btn:hover {
  background: var(--gold-primary);
  color: #0F172A;
}

/* --- DRAW STUDIO (RADIAL SYMMETRY) --- */

.draw-canvas-layers {
  position: relative;
  width: 760px;
  height: 760px;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: var(--shadow-lux);
  border-radius: 12px;
  overflow: hidden;
  background: #FFFFFF;
}

#draw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: crosshair;
}

#guide-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.range-slider {
  width: 100%;
  accent-color: var(--gold-primary);
}

/* --- PRINT CENTER STYLES --- */

.print-center-card {
  max-width: 900px;
  margin: 30px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lux);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.print-center-card h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--gold-light);
}

.print-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.print-option-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.print-option-card h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-main);
}

.print-option-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.print-spec-notes {
  background: rgba(229, 184, 66, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.print-spec-notes h4 {
  color: var(--gold-light);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.print-spec-notes ul {
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .studio-wrapper {
    flex-direction: column;
    height: auto;
  }
  .studio-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
}
