/* ============================================================
   design_style_panel.css
   Styles for the Style panel (Phase 5 toolbar extension).
   ============================================================ */

/* ── Tab navigation ──────────────────────────────────────── */
.ds-style-tab {
  color: #64748b;
  border-bottom: 2px solid transparent;
  background: transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-size: 0.75rem;
}
.ds-style-tab:hover {
  color: #1e293b;
  background: #f8fafc;
}
.ds-style-tab--active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
  background: #f5f3ff;
}

/* ── Shared control styles ───────────────────────────────── */
.ds-style-label {
  display: flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.ds-style-select {
  appearance: none;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  background-size: 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  font-size: 0.8125rem;
  color: #1e293b;
  cursor: pointer;
  transition: border-color 0.15s;
}
.ds-style-select:focus {
  outline: none;
  border-color: #6366f1;
}

.ds-style-input {
  border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.15s;
}
.ds-style-input:focus {
  outline: none;
  border-color: #6366f1;
  background: #fff;
}

/* ── Chip buttons ────────────────────────────────────────── */
.ds-chip-btn {
  background: #fff;
  border-color: #e2e8f0;
  color: #475569;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  padding: 0.25rem 0.5rem;
  text-align: center;
}
.ds-chip-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.ds-chip-btn--active,
.ds-chip-btn.bg-indigo-50 {
  background: #eef2ff !important;
  border-color: #818cf8 !important;
  color: #4f46e5 !important;
}

/* ── Color swatches ──────────────────────────────────────── */
.ds-color-swatch {
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
}
.ds-color-swatch:hover {
  transform: scale(1.12);
}

/* ── Range inputs ────────────────────────────────────────── */
input[type="range"].accent-indigo-500 {
  accent-color: #6366f1;
  width: 100%;
  cursor: pointer;
}

/* ── Visitor dark mode toggle ────────────────────────────── */
#ds-visitor-toggle-btn {
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

/* ── Save status flash ───────────────────────────────────── */
#ds-save-status {
  animation: ds-fade-in 0.2s ease;
}
@keyframes ds-fade-in {
  from { opacity: 0; } to { opacity: 1; }
}

/* ── Dark mode compatibility ─────────────────────────────── */
:is(body.theme-dark, body.ui-mode-dark, body.preset-mode-dark) .ds-style-tab {
  color: #94a3b8;
}
:is(body.theme-dark, body.ui-mode-dark, body.preset-mode-dark) .ds-style-tab--active {
  color: #a5b4fc;
  background: rgba(99,102,241,0.12);
  border-bottom-color: #818cf8;
}
:is(body.theme-dark, body.ui-mode-dark, body.preset-mode-dark) .ds-style-select,
:is(body.theme-dark, body.ui-mode-dark, body.preset-mode-dark) .ds-style-input {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
:is(body.theme-dark, body.ui-mode-dark, body.preset-mode-dark) .ds-chip-btn {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
:is(body.theme-dark, body.ui-mode-dark, body.preset-mode-dark) .ds-chip-btn--active,
:is(body.theme-dark, body.ui-mode-dark, body.preset-mode-dark) .ds-chip-btn.bg-indigo-50 {
  background: rgba(99,102,241,0.18) !important;
  border-color: #818cf8 !important;
  color: #a5b4fc !important;
}
