/*
 * Style Studio — visual style picker chrome.
 * The floating panel that surfaces every tweakable axis.
 * Behavior lives in js/studio.js.
 */

/* ============================================================
     STUDIO PANEL — visual style picker (always on top)
     ============================================================ */
  .studio-panel {
    position: fixed; right: 16px; bottom: 16px;
    width: 256px; max-height: calc(100vh - 32px);
    overflow-y: auto; z-index: 2000;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    font-size: 12px;
    color: #111;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 280ms cubic-bezier(.2,.7,.2,1), opacity 200ms;
  }
  .studio-panel[data-collapsed="true"] {
    transform: translateY(calc(100% - 38px));
  }
  .studio-panel header.sp-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px 9px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    background: transparent;
    cursor: pointer;
    user-select: none;
  }
  .studio-panel .sp-title { font-weight: 600; letter-spacing: 0.02em; font-size: 11px; text-transform: uppercase; color: #333; display: flex; align-items: center; gap: 7px; }
  .studio-panel .sp-title .sp-dot { width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #0d9488, #5cd7ff); box-shadow: 0 0 8px rgba(13,148,136,.5); }
  .studio-panel .sp-toggle { font-size: 14px; color: #888; line-height: 1; }
  .studio-panel .sp-body { padding: 10px 14px 16px; display: flex; flex-direction: column; gap: 14px; }
  .studio-panel .sp-section-label {
    font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em;
    color: #777; font-weight: 600; margin-bottom: 6px;
  }
  .studio-panel .sp-theme-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  }
  .studio-panel .sp-theme-card {
    padding: 8px 6px 6px; border: 1.5px solid rgba(0,0,0,0.10);
    border-radius: 7px; cursor: pointer; background: #fff;
    display: flex; flex-direction: column; gap: 5px;
    transition: transform 100ms, border-color 100ms;
  }
  .studio-panel .sp-theme-card:hover { transform: translateY(-1px); border-color: rgba(0,0,0,0.25); }
  .studio-panel .sp-theme-card.active { border-color: #111; border-width: 2px; padding: 7px 5px 5px; }
  .studio-panel .sp-theme-swatch {
    height: 32px; border-radius: 4px; position: relative; overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
  }
  .studio-panel .sp-theme-name { font-size: 10px; text-align: center; font-weight: 500; color: #444; }
  .studio-panel .sp-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .studio-panel .sp-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .studio-panel .sp-pill {
    border: 1.5px solid rgba(0,0,0,0.10); border-radius: 6px;
    padding: 6px 8px; background: #fff; font-size: 11px;
    cursor: pointer; color: #333; font-weight: 500;
    transition: background 100ms, color 100ms;
    text-align: center;
  }
  .studio-panel .sp-pill.active { background: #111; color: #fff; border-color: #111; }
  .studio-panel .sp-pill:hover:not(.active) { background: rgba(0,0,0,0.03); }
  .studio-panel .sp-color-swatch {
    display: flex; align-items: center; gap: 4px; padding: 5px 6px;
    justify-content: flex-start; font-size: 10.5px;
  }
  .studio-panel .sp-swatch-dot {
    width: 12px; height: 12px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15); flex-shrink: 0;
  }
  .studio-panel .sp-presets-row { display: flex; flex-wrap: wrap; gap: 5px; }
  .studio-panel .sp-preset-btn {
    border: 1px solid rgba(0,0,0,0.10); border-radius: 4px;
    padding: 5px 8px; background: #fafafa; font-size: 11px;
    cursor: pointer; color: #444;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    transition: background 100ms;
  }
  .studio-panel .sp-preset-btn:hover { background: #efefef; }
  .studio-panel .sp-divider {
    height: 1px; background: rgba(0,0,0,0.06); margin: 4px 0;
  }
  .studio-panel .sp-footer {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 10px; color: #888;
  }
  .studio-panel .sp-link {
    color: #0d9488; cursor: pointer; text-decoration: none; font-weight: 500;
  }
  .studio-panel .sp-link:hover { text-decoration: underline; }

  /* Studio panel itself doesn't theme — it stays light */
  :root[data-theme="phosphor"] .studio-panel,
  :root[data-theme="blueprint"] .studio-panel {
    background: rgba(20,28,40,0.94);
    color: #e2efff;
    border-color: rgba(255,255,255,0.10);
  }
  :root[data-theme="phosphor"] .studio-panel .sp-title,
  :root[data-theme="blueprint"] .studio-panel .sp-title { color: #b8c8da; }
  :root[data-theme="phosphor"] .studio-panel .sp-section-label,
  :root[data-theme="blueprint"] .studio-panel .sp-section-label { color: #8da0b8; }
  :root[data-theme="phosphor"] .studio-panel .sp-theme-card,
  :root[data-theme="blueprint"] .studio-panel .sp-theme-card { background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1); }
  :root[data-theme="phosphor"] .studio-panel .sp-theme-card.active,
  :root[data-theme="blueprint"] .studio-panel .sp-theme-card.active { border-color: #5cd7ff; }
  :root[data-theme="phosphor"] .studio-panel .sp-pill,
  :root[data-theme="blueprint"] .studio-panel .sp-pill {
    background: rgba(255,255,255,0.05); color: #b8c8da; border-color: rgba(255,255,255,0.1);
  }
  :root[data-theme="phosphor"] .studio-panel .sp-pill.active,
  :root[data-theme="blueprint"] .studio-panel .sp-pill.active {
    background: #5cd7ff; color: #07182a; border-color: #5cd7ff;
  }
  :root[data-theme="phosphor"] .studio-panel .sp-theme-name,
  :root[data-theme="blueprint"] .studio-panel .sp-theme-name { color: #c8d4e4; }
  :root[data-theme="phosphor"] .studio-panel .sp-preset-btn,
  :root[data-theme="blueprint"] .studio-panel .sp-preset-btn {
    background: rgba(255,255,255,0.05); color: #c8d4e4; border-color: rgba(255,255,255,0.1);
  }