/* ==========================================================================
   Image to Watercolor Studio - PicDriver
   ========================================================================== */

/* Main Layout */
.watercolor-studio-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 140px);
}

@media (max-width: 1024px) {
  .watercolor-studio-container {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

/* Left: Stage Area */
.watercolor-stage-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.watercolor-stage-wrapper {
  position: relative;
  background: #080c14;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 16px);
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 8px 32px rgba(0, 0, 0, 0.3);
  user-select: none;
}

/* Canvas Viewport */
.canvas-viewport-container {
  position: relative;
  max-width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
}

#outputCanvas {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background-color: #ffffff;
}

#originalCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  clip-path: inset(0 50% 0 0);
  display: none;
}

/* Split Compare Slider Handle */
.split-slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
  cursor: ew-resize;
  z-index: 25;
  display: none;
}

.split-slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #06b6d4;
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  cursor: ew-resize;
}

/* Stage HUD Overlay */
.stage-hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 30;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.78rem;
  font-family: var(--font-mono, monospace);
  color: var(--text-primary, #ffffff);
}

.hud-dot {
  width: 8px;
  height: 8px;
  background: #06b6d4;
  border-radius: 50%;
  box-shadow: 0 0 8px #06b6d4;
}

.stage-hud-bottom {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 30;
}

.stage-instructions {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: var(--radius-full, 9999px);
}

.stage-actions-group {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.stage-action-btn {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.stage-action-btn:hover {
  background: #06b6d4;
  border-color: #06b6d4;
  transform: translateY(-1px);
}

.stage-action-btn.active {
  background: #06b6d4;
  border-color: #06b6d4;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
}

/* Quick Action Download Bar */
.action-download-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Preset Carousel Pills */
.presets-carousel-wrap {
  margin-bottom: 16px;
}

.presets-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #64748b);
  margin-bottom: 8px;
}

.preset-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.preset-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface, #131d31);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  color: var(--text-secondary, #94a3b8);
  padding: 8px 14px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.preset-pill:hover {
  border-color: #06b6d4;
  color: #fff;
  transform: translateY(-1px);
}

.preset-pill.active {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  border-color: #06b6d4;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.4);
}

/* Right: Tool Controls Sidebar */
.tool-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-section {
  background: var(--bg-card, #0e1524);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  padding: 16px;
}

.control-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Upload Dropzone */
.dropzone-compact {
  position: relative;
  display: block;
  border: 2px dashed rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-md, 12px);
  padding: 18px 14px;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 12px;
  overflow: hidden;
  user-select: none;
}

.dropzone-compact:hover,
.dropzone-compact.drag-over {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.2);
}

.dropzone-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.dropzone-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
}

.dropzone-browse-link {
  color: #06b6d4;
  text-decoration: underline;
  font-weight: 700;
}

.dropzone-sub {
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  margin-top: 4px;
}

.dropzone-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #ffffff;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.35);
}

/* Sample Quick Buttons */
.samples-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.sample-chip {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #94a3b8);
  padding: 6px 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.sample-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: #06b6d4;
  color: #fff;
}

/* Slider Controls */
.slider-row {
  margin-bottom: 14px;
}

.slider-row:last-child {
  margin-bottom: 0;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 6px;
}

.slider-val {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: #06b6d4;
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  accent-color: #06b6d4;
}

/* Paper Swatches */
.paper-swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.paper-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.paper-swatch:hover {
  border-color: #06b6d4;
  transform: translateY(-1px);
}

.paper-swatch.active {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.15);
}

.paper-swatch-preview {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.paper-swatch-title {
  font-size: 0.68rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
  text-align: center;
}

/* Toast Pill */
.toast-pill {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid #06b6d4;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100000;
}

.toast-pill.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-pill.success {
  border-color: #10b981;
}

.toast-pill.error {
  border-color: #ef4444;
  color: #fca5a5;
}

/* Toggle Switch Safeguards */
.switch-toggle,
.toggle-switch {
  position: relative !important;
  display: inline-block !important;
  width: 44px !important;
  height: 24px !important;
  flex-shrink: 0;
  vertical-align: middle;
}

.switch-toggle input,
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute !important;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .2s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

.switch-toggle input:checked + .toggle-slider,
.toggle-switch input:checked + .toggle-slider {
  background-color: #06b6d4;
}

.switch-toggle input:checked + .toggle-slider:before,
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Educational Guide Content Styles */
.seo-guide-container {
  max-width: 1200px;
  margin: 48px auto;
  padding: 0 24px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.7;
}

.seo-guide-container h2 {
  color: var(--text-primary, #ffffff);
  font-size: 1.6rem;
  font-weight: 800;
  margin: 32px 0 16px;
  border-left: 4px solid #06b6d4;
  padding-left: 14px;
}

.seo-guide-container h3 {
  color: var(--text-primary, #ffffff);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 24px 0 12px;
}

.seo-guide-container p {
  margin-bottom: 16px;
}

.seo-guide-container ul,
.seo-guide-container ol {
  margin: 12px 0 20px 24px;
}

.seo-guide-container li {
  margin-bottom: 8px;
}

.faq-accordion {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card, #0e1524);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  padding: 16px 20px;
}

.faq-question {
  color: var(--text-primary, #ffffff);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.6;
}
