/* Extracted from app/static/css/modern.css to restore dev-panel styling after the Phase 06 Tailwind migration (base.html no longer links modern.css). */

.devpanel {
  position: relative;
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  /* The --aurora-* vars are only defined by the Aurora theme stylesheet (not
     loaded on the classic template). The dev-panel is a dark overlay on every
     template, so scope light text vars here to keep labels/headers readable
     when modern.css/aurora.css aren't loaded. */
  --aurora-text: rgba(248, 250, 252, 0.92);
  --aurora-muted: rgba(248, 250, 252, 0.6);
}

.devpanel__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
  z-index: 1040;
}

.devpanel__inner {
  position: fixed;
  top: 10vh;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.88) 0%,
    rgba(2, 6, 23, 0.78) 100%
  );
  backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 1rem;
  overflow: hidden;
  width: 420px;
  max-width: calc(100vw - 48px);
  max-height: min(80vh, 720px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  z-index: 1045;
}

.devpanel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.devpanel__header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.92);
}

.devpanel__close {
  background: transparent;
  border: none;
  color: rgba(248, 250, 252, 0.6);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 999px;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.devpanel__close:hover,
.devpanel__close:focus-visible {
  background: rgba(248, 250, 252, 0.12);
  color: rgba(248, 250, 252, 0.95);
  outline: none;
}

.devpanel__scroll {
  padding: 1.1rem 1.5rem 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 0;
}

.devpanel__scroll::-webkit-scrollbar {
  width: 8px;
}

.devpanel__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.devpanel__scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 4px;
}

.devpanel__scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
}

.devpanel__footer {
  display: none;
}

.devpanel__group {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  color: rgba(248, 250, 252, 0.92);
  margin-bottom: 0.15rem;
}

.devpanel__group-head h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--aurora-text);
  margin-bottom: 0.15rem;
}

.devpanel__group-head p {
  font-size: 0.85rem;
  color: var(--aurora-muted);
  margin: 0;
}

.devpanel__options {
  display: grid;
  gap: 0.5rem;
}

.neo-switch {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.9rem;
  /* Dark-translucent surface so the light .neo-switch__label stays readable on
     the dark panel (was near-white, which hid the light label). */
  background: rgba(248, 250, 252, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.neo-switch input {
  appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  position: relative;
  transition: background 0.2s ease;
}

.neo-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  transition: transform 0.2s ease;
}

.neo-switch input:checked {
  background: rgba(59, 130, 246, 0.6);
}

.neo-switch input:checked::after {
  transform: translateX(18px);
}

.neo-switch__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--aurora-text);
}

.devpanel__select {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--aurora-text);
  max-width: 100%;
}

.devpanel__select select {
  flex: 1;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.55rem 0.75rem;
  min-width: 0;
  /* Explicit dark surface + light text — the native select otherwise inherited
     the panel's light color, rendering light-on-light (unreadable). */
  background: rgba(15, 23, 42, 0.6);
  color: rgba(248, 250, 252, 0.92);
}

.devpanel__select select option {
  /* Native dropdown popups render on the OS default (light) surface, so force
     dark text there regardless of the light color set on the select itself. */
  color: #0f172a;
}

.devpanel__hint {
  font-size: 0.82rem;
  color: var(--aurora-muted);
  margin: 0;
}

.devpanel__color-grid {
  display: grid;
  gap: 0.65rem;
}

.devpanel__color-grid label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(40px, 20%);
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--aurora-text);
}

.devpanel__color-grid input[type="color"] {
  background: rgba(15, 23, 42, 0.72);
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  width: 100%;
  min-width: 40px;
  height: 40px;
  padding: 0.15rem;
}

/* Quick-260604-elj — the kept number/select fields (logo height, opacity,
   alignment, fit, scale) otherwise inherited the panel's light text and
   rendered light-on-light. Mirror the .devpanel__select select surface. */
.devpanel__color-grid input[type="number"],
.devpanel__color-grid select {
  background: rgba(15, 23, 42, 0.6);
  color: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.85rem;
  padding: 0.55rem 0.75rem;
}

.devpanel__color-grid select option {
  /* Native dropdown popups render on the OS default (light) surface. */
  color: #0f172a;
}

.devpanel__actions {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.devpanel__actions .btn {
  width: 100%;
  justify-content: center;
}

.devpanel__file {
  display: none;
}

/* Hide the scrollbar on the header action cluster when it scrolls
   horizontally on narrow viewports (keeps the toolbar tidy while still
   allowing every action to be reached). */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
