/* =========================================================
   theme-picker.css  —  Admin theme builder panel styles
   ========================================================= */

/* ── Root container ── */
.theme-picker-root {
  position: relative;
}

/* ── Tab strip ── */
.tp-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-default, rgba(255,255,255,0.1));
  margin-bottom: 1.25rem;
  padding-bottom: 0;
}

.tp-tab {
  padding: 0.45rem 0.85rem;
  border-radius: 0.375rem 0.375rem 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
}

.tp-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card, rgba(255,255,255,0.04));
}

.tp-tab.is-active {
  color: var(--accent-blue);
  background: var(--bg-card, rgba(255,255,255,0.07));
  border-color: var(--border-default, rgba(255,255,255,0.1));
  border-bottom-color: var(--bg-card, var(--bg-secondary));
}

/* ── Panels ── */
.tp-panel {
  display: none;
}
.tp-panel.is-active {
  display: block;
}

/* ── Enable toggle ── */
.tp-enable-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0;
  margin-bottom: 1rem;
  cursor: pointer;
  user-select: none;
}

.tp-enable-chk {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent-blue);
  flex-shrink: 0;
}

.tp-enable-label {
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* ── Disabled body ── */
.tp-body.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

/* ── Section title ── */
.tp-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

/* ── Preset picker ── */
.tp-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tp-preset-item {
  cursor: pointer;
}

.tp-preset-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tp-preset-card {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.375rem;
  border: 1.5px solid var(--border-default, rgba(255,255,255,0.1));
  background: var(--bg-card, rgba(255,255,255,0.04));
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.tp-preset-card:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.tp-preset-item input:checked + .tp-preset-card {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(59,130,246,0.08);
}

/* Preset color dot */
.tp-preset-dot {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.tp-preset-dot--dark-neon      { background: linear-gradient(135deg,#3b82f6,#8b5cf6); }
.tp-preset-dot--midnight-gold  { background: linear-gradient(135deg,#d97706,#fbbf24); }
.tp-preset-dot--crimson-strike { background: linear-gradient(135deg,#ef4444,#f97316); }
.tp-preset-dot--cyber-green    { background: linear-gradient(135deg,#22c55e,#4ade80); }
.tp-preset-dot--arctic-white   { background: linear-gradient(135deg,#2563eb,#7c3aed); border: 1px solid rgba(0,0,0,0.15); }

/* ── Custom color grid ── */
.tp-custom-colors.is-hidden {
  display: none;
}

.tp-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.tp-color-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.tp-color-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tp-color-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tp-color-swatch {
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  border: 1.5px solid var(--border-default, rgba(255,255,255,0.12));
  padding: 0.1rem;
  cursor: pointer;
  background: transparent;
  flex-shrink: 0;
}

.tp-color-text {
  font-size: 0.78rem;
  font-family: ui-monospace, monospace;
  padding: 0.3rem 0.5rem;
  border-radius: 0.25rem;
  border: 1.5px solid var(--border-default, rgba(255,255,255,0.12));
  background: var(--bg-card, rgba(255,255,255,0.04));
  color: var(--text-primary);
  width: 7.5rem;
  transition: border-color 0.15s;
}

.tp-color-text:focus {
  outline: none;
  border-color: var(--accent-blue);
}

.tp-color-text.is-invalid {
  border-color: #ef4444;
}

/* ── Action buttons row ── */
.tp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-default, rgba(255,255,255,0.08));
  margin-top: 0.5rem;
}

/* ── Preview banner ── */
.tp-preview-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(59,130,246,0.4);
  white-space: nowrap;
}

.tp-preview-banner a {
  color: #fff;
  text-decoration: underline;
  margin-left: 0.5rem;
}
