﻿/* Artisano Studio - Dark Theme Artist Workspace CSS (Scoped) */
:root {
  --bg-primary: #121318;
  --bg-secondary: #1a1c23;
  --bg-panel: #21232d;
  --bg-panel-hover: #2a2d3a;
  --accent-cyan: #00e5ff;
  --accent-gold: #e5b95f;
  --accent-purple: #9d4edd;
  --accent-pink: #f72585;
  --accent-emerald: #10b981;
  --text-main: #f0f2f5;
  --text-muted: #9ba1b0;
  --border-color: #2e3242;
  --border-light: rgba(255, 255, 255, 0.08);
  --sidebar-width: 330px;
  --inspector-width: 360px;
  --header-height: 56px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Studio Workspace Container */

#tabStudio {
  background-color: var(--bg-primary);
  color: var(--text-main);
  height: calc(100vh - 65px);
  max-height: calc(100vh - 65px);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#tabStudio.active {
  display: flex;
}

/* Header */
.app-header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 24px;
}

.brand-title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #fff;
  display: block;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

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

/* Layout Body */

.app-body {
  display: flex;
  flex: 1;
  height: calc(100vh - 65px - var(--header-height));
  max-height: calc(100vh - 65px - var(--header-height));
  min-height: 0;
  position: relative;
  overflow: hidden;
}

/* Sidebars */

.sidebar, .inspector {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100%;
  max-height: 100%;
  padding: 14px;
  gap: 12px;
  z-index: 5;
}

.sidebar {
  width: var(--sidebar-width);
  border-right: 1px solid var(--border-color);
}

.inspector {
  width: var(--inspector-width);
  border-left: 1px solid var(--border-color);
}

.sidebar-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

/* Mode Switcher Grid */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.mode-btn:hover {
  background: var(--bg-panel-hover);
  color: var(--text-main);
}

.mode-btn.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

.mode-btn .icon {
  font-size: 18px;
}

/* Control Groups & Sliders */
.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-main);
}

.control-value {
  color: var(--accent-cyan);
  font-family: monospace;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #2a2d3a;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

select {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

select:focus {
  border-color: var(--accent-cyan);
}

/* Artist Selector Chips */
.artist-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.artist-chip {
  padding: 8px;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.artist-chip:hover {
  background: var(--bg-panel-hover);
}

.artist-chip.active {
  background: rgba(229, 185, 95, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 600;
}

/* Primary Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-cyan);
  color: #000;
}

.btn-primary:hover {
  background: #26ecff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.btn-secondary {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-panel-hover);
}

.btn-secondary.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-gold {
  background: var(--accent-gold);
  color: #1a1200;
}

.btn-gold:hover {
  background: #f0cb7d;
}

.btn-block {
  width: 100%;
}

/* Canvas Viewport */

.canvas-viewport {
  flex: 1;
  height: 100%;
  max-height: 100%;
  position: relative;
  background: #0d0e12;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewport-toolbar {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 28, 35, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 30px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.tool-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.tool-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.tool-btn.active {
  color: #000;
  background: var(--accent-cyan);
  font-weight: 600;
}

.canvas-stack {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: default;
}

.canvas-stack canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

/* Split Slider Handle */
.split-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-cyan);
  cursor: ew-resize;
  z-index: 15;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.8);
}

.split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #000;
  border: 2px solid var(--accent-cyan);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

/* Inspector Cards & Notan Ratios */
.inspector-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ratio-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  margin: 6px 0;
  border: 1px solid var(--border-color);
}

.ratio-dark { background: #111; height: 100%; transition: width 0.3s ease; }
.ratio-mid { background: #777; height: 100%; transition: width 0.3s ease; }
.ratio-light { background: #fff; height: 100%; transition: width 0.3s ease; }

.ratio-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); }
.badge-warning { background: rgba(229, 185, 95, 0.2); color: var(--accent-gold); }
.badge-danger { background: rgba(247, 37, 133, 0.2); color: var(--accent-pink); }
.badge-info { background: rgba(0, 229, 255, 0.2); color: var(--accent-cyan); }

.critique-item {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.swatch-row {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

/* ==========================================
   AI PAINTING MENTOR & CANVAS GUIDE STYLING
   ========================================== */
.mentor-nav-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-panel);
  padding: 3px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.mentor-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.mentor-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.mentor-tab-btn.active {
  background: var(--accent-gold);
  color: #120e03;
  font-weight: 700;
}

.mentor-stage-item {
  margin-bottom: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 3px solid var(--accent-gold);
}

.mentor-stage-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 3px;
}

.mentor-stage-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 4px;
}

.mentor-stage-rule {
  font-size: 10px;
  color: var(--accent-cyan);
  font-style: italic;
}

.mentor-brush-pill {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
  margin-bottom: 6px;
}

.mentor-brush-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.mentor-brush-use {
  font-size: 10px;
  color: var(--text-muted);
}

.mentor-palette-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
}

.mentor-color-chip {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
