/**
 * 99tools Color Palette Studio CSS
 * High-performance, distraction-free SaaS color canvas matching & exceeding Coolors.co
 * Supports dynamic 2-10 color columns, contrast badges, tints/shades popover, and export modals.
 *
 * @package 99tools
 */

/* ==========================================================================
   1. APP CONTAINER & LAYOUT
   ========================================================================== */
.palette-studio-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: clamp(600px, 78vh, 760px);
  min-height: 580px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  user-select: none;
}

/* When in Fullscreen Studio Mode */
.palette-studio-app.is-fullscreen-app,
.tool-fullscreen-active .palette-studio-app,
body.is-fullscreen .palette-studio-app {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  z-index: 99999999 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: var(--bg-surface);
}

.palette-studio-app.is-fullscreen-app .palette-columns-stage {
  height: 100% !important;
}

/* Studio Top Navigation Bar */
.palette-studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 30;
  min-height: 52px;
}

.palette-studio-topbar .saas-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.palette-studio-topbar .saas-toolbar-right .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.palette-studio-topbar .saas-toolbar-right .btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.palette-studio-topbar .saas-toolbar-right .btn-outline:hover {
  border-color: var(--brand-gold, #D4A843);
  color: var(--brand-gold, #D4A843);
  background: rgba(212, 168, 67, 0.08);
  transform: translateY(-1px);
}

.palette-studio-topbar .saas-toolbar-right .btn-primary {
  background: linear-gradient(135deg, var(--brand-gold, #D4A843) 0%, #b88f34 100%);
  color: #111111;
  border: 1px solid #D4A843;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(212, 168, 67, 0.3);
}

.palette-studio-topbar .saas-toolbar-right .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 168, 67, 0.45);
  opacity: 0.96;
}

.palette-studio-topbar .saas-toolbar-right #btnPaletteFullscreen.is-active {
  background: rgba(212, 168, 67, 0.15);
  border-color: var(--brand-gold, #D4A843);
  color: var(--brand-gold, #D4A843);
}

.palette-nav-tabs-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

/* Studio Sub-Header Toolbar (Active in Generator view) */
.palette-studio-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 1.25rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.825rem;
  z-index: 25;
  min-height: 46px;
  transition: all 0.2s ease;
}

.palette-subbar-left,
.palette-subbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

.palette-harmony-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.palette-harmony-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.palette-history-btns {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.palette-history-btns .saas-toolbar-btn {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0.35rem 0.6rem !important;
  height: 30px;
  width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  cursor: pointer;
}

.palette-history-btns .saas-toolbar-btn:first-child {
  border-right: 1px solid var(--border-subtle) !important;
}

.palette-history-btns .saas-toolbar-btn:hover:not(:disabled) {
  background: var(--bg-subtle) !important;
  color: var(--brand-gold, #D4A843);
}

.palette-history-btns .saas-toolbar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.palette-color-count {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  white-space: nowrap;
}

#btnPaletteAddColor {
  background: rgba(212, 168, 67, 0.12) !important;
  border: 1px solid rgba(212, 168, 67, 0.35) !important;
  color: var(--brand-gold, #D4A843) !important;
  font-weight: 700 !important;
  border-radius: var(--radius-full) !important;
  padding: 0.3rem 0.85rem !important;
  font-size: 0.775rem !important;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

#btnPaletteAddColor:hover {
  background: rgba(212, 168, 67, 0.22) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(212, 168, 67, 0.25);
}

/* Spacebar Hint Pill */
.palette-spacebar-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: var(--radius-full);
  color: var(--brand-gold, #D4A843);
  font-weight: 600;
  font-size: 0.775rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.palette-spacebar-pill:hover {
  background: rgba(212, 168, 67, 0.2);
  transform: translateY(-1px);
}

.palette-spacebar-pill kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Harmony Selector Dropdown */
.palette-harmony-select {
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.palette-harmony-select:focus {
  border-color: var(--brand-gold, #D4A843);
}

/* ==========================================================================
   2. INTERACTIVE COLOR COLUMNS CANVAS
   ========================================================================== */
.palette-columns-stage {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #111;
}

.palette-column {
  flex: 1 1 0;
  height: 100%;
  min-height: 0;
  min-width: 80px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0.75rem 1.6rem 0.75rem;
  box-sizing: border-box;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), flex-grow 0.2s ease;
  overflow: hidden;
}

.palette-column:hover {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

/* Dynamic contrast colors: set automatically via JS --col-fg */
.palette-column {
  color: var(--col-fg, #ffffff);
}

/* Column Top Action Bar (Delete, Drag Handle) */
.palette-col-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0.9;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.palette-column:hover .palette-col-top {
  opacity: 1;
}

.palette-col-btn {
  background: var(--col-btn-bg, rgba(0, 0, 0, 0.22));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--col-btn-border, rgba(255, 255, 255, 0.25));
  color: var(--col-fg, #ffffff);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.palette-col-btn:hover {
  background: var(--col-btn-hover, rgba(0, 0, 0, 0.38));
  transform: scale(1.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.palette-col-btn:active {
  transform: scale(0.95);
}

.palette-col-btn[disabled] {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.palette-col-drag {
  cursor: grab;
}

.palette-column.is-dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

/* Column Center Action Controls (Lock, Shades, Adjust) */
.palette-col-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  z-index: 10;
  opacity: 0.88;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.palette-column:hover .palette-col-actions {
  opacity: 1;
}

/* Column Bottom Data (Hex Code, Name, Contrast Badge) */
.palette-col-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  z-index: 10;
  cursor: pointer;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-lg);
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
  width: 100%;
  max-width: 180px;
}

.palette-col-bottom:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.palette-col-hex {
  font-family: var(--font-mono, monospace);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-transform: uppercase;
  position: relative;
}

.palette-col-name {
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0.9;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-col-wcag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.675rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 0.2rem;
  letter-spacing: 0.02em;
}

/* Copied Toast Alert on Column */
.palette-copied-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

.palette-copied-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Lock Button States */
.palette-col-lock.is-locked {
  background: rgba(212, 168, 67, 0.9) !important;
  color: #111 !important;
  border-color: #D4A843 !important;
  box-shadow: 0 0 10px rgba(212, 168, 67, 0.5);
}

/* Column Add Dividers (Hover In-between) */
.palette-col-add-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  right: -12px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.palette-column:hover .palette-col-add-divider,
.palette-col-add-divider:hover {
  opacity: 1;
  pointer-events: auto;
}

.palette-col-add-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--brand-gold, #D4A843);
  color: #111;
  border: 2px solid var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  font-weight: 800;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
  padding: 0;
}

.palette-col-add-btn:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   3. SHADES & TINTS POPOVER
   ========================================================================== */
.palette-popover-shade {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.6rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 40;
  min-width: 140px;
  max-height: 280px;
  overflow-y: auto;
}

.palette-shade-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: background 0.15s ease;
}

.palette-shade-row:hover {
  background: var(--bg-subtle);
}

.palette-shade-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.15);
}

/* ==========================================================================
   4. COLOR ADJUST POPOVER (Hex, Picker, Sliders)
   ========================================================================== */
.palette-popover-adjust {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 10px 35px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 40;
  width: 230px;
  color: var(--text-primary);
}

.palette-adjust-hex-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.palette-adjust-native-picker {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
  background: none;
}

.palette-adjust-input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-mono, monospace);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
}

.palette-adjust-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.palette-adjust-slider-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.palette-adjust-slider-group input[type="range"] {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  accent-color: var(--brand-gold, #D4A843);
  cursor: pointer;
}

/* ==========================================================================
   5. EXPORT MODAL & SAVED PALETTES MODAL
   ========================================================================== */
.palette-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.palette-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.palette-modal-dialog {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(15px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.palette-modal-backdrop.is-open .palette-modal-dialog {
  transform: translateY(0);
}

.palette-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.palette-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.palette-modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}

.palette-modal-close:hover {
  color: var(--text-primary);
}

.palette-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

/* Tabs inside Export Modal */
.palette-export-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
  overflow-x: auto;
}

.palette-export-tab {
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.palette-export-tab:hover {
  color: var(--text-primary);
}

.palette-export-tab.is-active {
  color: var(--brand-gold, #D4A843);
  border-bottom-color: var(--brand-gold, #D4A843);
}

.palette-export-codebox {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.825rem;
  color: var(--text-primary);
  max-height: 250px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Saved Palettes Item Card */
.palette-saved-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.palette-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  gap: 1rem;
  transition: border-color 0.2s ease;
}

.palette-saved-item:hover {
  border-color: var(--brand-gold, #D4A843);
}

.palette-saved-swatches {
  display: flex;
  height: 28px;
  width: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.palette-saved-swatch {
  flex: 1;
  height: 100%;
}

.palette-saved-meta {
  flex: 1;
}

.palette-saved-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.palette-saved-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.palette-saved-actions {
  display: flex;
  gap: 0.4rem;
}

/* ==========================================================================
   7. STUDIO MODE SWITCHER & VIEWS (Phase 2)
   ========================================================================== */
.palette-nav-tabs-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.palette-nav-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem;
  gap: 0.25rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.palette-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.325rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.palette-nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.palette-nav-tab.is-active {
  background: var(--bg-surface-elevated);
  color: var(--brand-gold, #D4A843);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  font-weight: 700;
}

.palette-view-panel {
  display: none;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  position: relative;
}

.palette-view-panel.is-active {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
}

/* ==========================================================================
   8. VISUALIZER MOCKUP ENGINE
   ========================================================================== */
.palette-visualizer-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--bg-surface);
}

.palette-vis-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.palette-vis-stage-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: #0f1117;
  overflow-y: auto;
}

.palette-vis-preview-box {
  width: 100%;
  max-width: 900px;
  background: var(--v-bg, #0f172a);
  color: var(--v-text, #f8fafc);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

/* Mockup Template 1: SaaS Landing Page */
.mockup-landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mockup-landing-logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--v-primary, #3b82f6);
}

.mockup-landing-hero {
  padding: 3.5rem 2rem 2.5rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.mockup-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--v-secondary, #ec4899);
  color: #fff;
  margin-bottom: 1rem;
}

.mockup-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--v-primary, #3b82f6);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.mockup-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 2rem 3rem;
}

.mockup-card {
  background: var(--v-surface, #1e293b);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Mockup Template 2: Mobile App UI */
.mockup-mobile-shell {
  width: 340px;
  margin: 0 auto;
  background: var(--v-bg, #0f172a);
  border-radius: 36px;
  border: 8px solid #222;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  overflow: hidden;
  padding: 1.5rem 1rem 1rem;
}

.mockup-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.mockup-mobile-card {
  background: var(--v-surface, #1e293b);
  border-radius: 18px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.mockup-mobile-dock {
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 0.5rem;
  background: var(--v-surface, #1e293b);
  border-radius: 20px;
  margin-top: 1rem;
}

/* Mockup Template 3: Dashboard */
.mockup-dash-shell {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 420px;
}

.mockup-dash-sidebar {
  background: var(--v-surface, #1e293b);
  padding: 1.5rem 1rem;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.mockup-dash-main {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mockup-dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.mockup-dash-stat-box {
  background: var(--v-surface, #1e293b);
  padding: 1rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--v-primary, #3b82f6);
}

/* Mockup Template 4: Editorial Poster */
.mockup-poster-shell {
  padding: 3rem 2.5rem;
  border-left: 12px solid var(--v-primary, #3b82f6);
  background: var(--v-bg, #fefefe);
  color: var(--v-text, #111);
}

.mockup-poster-headline {
  font-family: Georgia, serif;
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--v-primary, #3b82f6);
}

.mockup-poster-quote {
  font-size: 1.25rem;
  font-style: italic;
  padding-left: 1rem;
  border-left: 3px solid var(--v-secondary, #ec4899);
  margin-top: 1.5rem;
}

/* ==========================================================================
   9. IMAGE PALETTE EXTRACTOR (PHOTO EYEDROPPER)
   ========================================================================== */
.palette-image-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--bg-surface);
}

.palette-image-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-surface-elevated);
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 1.5rem auto;
  max-width: 650px;
  width: 90%;
}

.palette-image-dropzone:hover,
.palette-image-dropzone.is-dragover {
  border-color: var(--brand-gold, #D4A843);
  background: rgba(212, 168, 67, 0.05);
}

.palette-image-preview-area {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  gap: 1.5rem;
  width: 100%;
}

.palette-image-preview-area.has-image {
  display: flex;
}

.palette-sampler-wrapper {
  position: relative;
  display: inline-block;
  max-width: 800px;
  max-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
}

.palette-sampler-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.palette-sampler-wrapper canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: none;
}

/* Draggable Sampler Pins */
.palette-sampler-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  cursor: grab;
  transform: translate(-50%, -50%);
  z-index: 20;
  transition: transform 0.1s ease;
}

.palette-sampler-pin:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.25);
}

/* Extracted Swatches Bar */
.palette-extracted-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  max-width: 800px;
}

.palette-extracted-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.palette-extracted-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
}

/* ==========================================================================
   10. WCAG CONTRAST CHECKER & MATRIX (Phase 3)
   ========================================================================== */
.palette-contrast-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--bg-surface);
  padding: 1.5rem;
  gap: 1.5rem;
}

.palette-contrast-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .palette-contrast-top-grid {
    grid-template-columns: 1fr;
  }
}

.palette-contrast-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.palette-contrast-pickers {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.palette-contrast-picker-box {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.palette-contrast-picker-box label {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.palette-contrast-score-hero {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.palette-contrast-score-num {
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--font-mono, monospace);
  line-height: 1;
  color: var(--text-primary);
}

.palette-contrast-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
}

.palette-contrast-badge-pill {
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
}

.palette-contrast-badge-pill.is-pass {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.palette-contrast-badge-pill.is-fail {
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.palette-contrast-preview-panel {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.2s ease;
}

/* Cross-Palette Matrix Table */
.palette-matrix-wrapper {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  overflow-x: auto;
}

.palette-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
}

.palette-matrix-table th {
  padding: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  text-align: center;
}

.palette-matrix-cell {
  padding: 0.6rem 0.4rem;
  text-align: center;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.palette-matrix-cell:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  z-index: 5;
}

.palette-matrix-cell.is-pass {
  background: rgba(16, 185, 129, 0.2);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.palette-matrix-cell.is-fail {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   11. TAILWIND CSS SCALE GENERATOR (Phase 3)
   ========================================================================== */
.palette-tailwind-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--bg-surface);
  padding: 1.5rem;
  gap: 1.5rem;
}

.palette-tw-ladder {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 0.35rem;
  background: var(--bg-surface-elevated);
  padding: 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

@media (max-width: 900px) {
  .palette-tw-ladder {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 600px) {
  .palette-tw-ladder {
    grid-template-columns: repeat(3, 1fr);
  }
}

.palette-tw-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.4rem;
  min-height: 140px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.palette-tw-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.palette-tw-step-num {
  font-size: 0.85rem;
  font-weight: 800;
}

.palette-tw-step-hex {
  font-size: 0.725rem;
  font-weight: 700;
}

/* ==========================================================================
   12. COLOR BLINDNESS / VISION SIMULATOR (Phase 3)
   ========================================================================== */
.palette-vision-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--bg-surface);
  padding: 1.5rem;
  gap: 1.25rem;
}

.palette-vision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.palette-vision-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.palette-vision-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.palette-vision-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.palette-vision-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.palette-vision-swatches {
  display: flex;
  height: 38px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.palette-vision-swatch {
  flex: 1;
  height: 100%;
  transition: background-color 0.2s ease;
}


