/*
 * Dev site theme - deliberately neutral so the page does not influence widget appearance.
 * Every rule is scoped to a .dev-* class. No global rules on bare elements.
 */

:root {
  --dev-green: #3e734b;
  --dev-text: #212529;
  --dev-line: #dee2e6;
  --dev-muted: #6c757d;
}
body {
  background: #555;
}
.dev-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--dev-text);
  background: #fff;
}

/* ---- Dev bar ---- */
.dev-bar {
  background: var(--dev-green);
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 0.3rem 0;
}
.dev-bar a { color: #fff; }
.dev-bar-left,
.dev-bar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
}
.dev-bar-name { font-weight: 700; }
.dev-chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  padding: 0 0.4rem;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
}

/* ---- Navbar ---- */
.dev-nav {
  border-bottom: 1px solid var(--dev-line);
  background: #fff;
}
.dev-brand {
  background: var(--dev-green);
  color: #fff !important;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.35rem 0.75rem;
}
.dev-nav .nav-link { color: var(--dev-text) !important; }
.dev-nav .nav-item.active > .nav-link { color: var(--dev-green) !important; font-weight: 600; }
.dev-nav .dropdown-menu {
  max-height: 75vh;
  overflow-y: auto;
  font-size: 0.875rem;
}
.dev-nav .dropdown-item.active,
.dev-nav .dropdown-item:active { background: var(--dev-green); color: #fff; }
.dev-nav .dropdown-item { padding: 0.3rem 1rem; }
@media (min-width: 1200px) {
  .dev-nav .dev-cols { column-count: 2; min-width: 26rem; }
  .dev-nav .dev-cols-3 { column-count: 3; min-width: 36rem; }
  .dev-nav .dev-cols .dropdown-item,
  .dev-nav .dev-cols .dropdown-divider { break-inside: avoid; }
}

/* ---- Title block (always white, outside the band) ---- */
.dev-titlebar {
  background: #fff;
  border-bottom: 1px solid var(--dev-line);
  padding: 0.9rem 0;
}
.dev-titlebar .breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
}
.dev-titlebar .breadcrumb-item.active { color: var(--dev-muted); }
.dev-title { font-size: 1.5rem; font-weight: 600; margin: 0; }
.dev-subtitle,
.dev-note { color: var(--dev-muted); margin: 0.25rem 0 0; font-size: 0.9375rem; }

/* ---- Content band ---- */
.dev-band {
  display: block;
  background: #666;
  padding: 2rem 0;
}
.dev-on-dark { color: #f1f1f1; }

/* ---- Sidebar test layout ---- */
.dev-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.dev-layout--right { flex-direction: row-reverse; }
.dev-sidebar { flex: 0 0 var(--dev-sbw, 300px); max-width: var(--dev-sbw, 300px); }
.dev-main { flex: 1 1 auto; min-width: 0; }
.dev-sidebar-placeholder {
  height: 400px;
  border: 2px dashed #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 0.875rem;
}
@media (max-width: 991.98px) {
  .dev-layout,
  .dev-layout--right { flex-direction: column; }
  .dev-sidebar { order: 2; flex-basis: auto; width: 100%; max-width: none; }
  .dev-sidebar-placeholder { height: 200px; }
}

/* ---- dev_widget() filter line ---- */
.dev-filter { font-size: 0.8125rem; margin-bottom: 0.75rem; word-break: break-all; }
.dev-widget-label { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }

/* ---- Footer ---- */
.dev-footer {
  border-top: 1px solid var(--dev-line);
  background: #fff;
  color: var(--dev-text);
  padding: 1.5rem 0 1rem;
  font-size: 0.875rem;
}
.dev-footer-notice { text-align: center; font-weight: 600; margin: 1rem 0 0.5rem; }
.dev-copyright { text-align: center; color: var(--dev-muted); font-size: 0.8125rem; }

/* ---- Home page index ---- */
.dev-index .card { color: var(--dev-text); height: 100%; }
.dev-index .card-header { font-weight: 600; }
.dev-index ul { list-style: none; padding: 0; margin: 0; font-size: 0.875rem; }
.dev-index li { padding: 0.15rem 0; }
.dev-index-file { color: var(--dev-muted); font-size: 0.75rem; margin-left: 0.35rem; }
.dev-index-tag { color: var(--dev-muted); font-size: 0.75rem; margin-left: 0.35rem; font-style: italic; }
.dev-index-empty { color: var(--dev-muted); display: none; }

/* ---- Layout panel ---- */
.dev-panel-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1040;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--dev-green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-size: 1.1rem;
}
.dev-panel {
  position: fixed;
  left: 16px;
  bottom: 70px;
  z-index: 1040;
  width: 300px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  background: #fff;
  color: var(--dev-text);
  border: 1px solid var(--dev-line);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  padding: 0.75rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8125rem;
  line-height: 1.4;
}
.dev-panel[hidden] { display: none; }
.dev-panel-title { font-weight: 700; font-size: 0.875rem; margin-bottom: 0.5rem; }
.dev-panel-row { margin-bottom: 0.6rem; }
.dev-panel-label { display: block; font-weight: 600; margin-bottom: 0.2rem; }
.dev-panel .form-control-sm { font-size: 0.8125rem; }
.dev-panel-inline { display: flex; gap: 0.4rem; align-items: center; }
.dev-swatches { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0.3rem; }
.dev-swatch {
  width: 24px;
  height: 24px;
  border: 1px solid #adb5bd;
  border-radius: 3px;
  padding: 0;
  cursor: pointer;
}
.dev-swatch.is-selected { outline: 2px solid var(--dev-green); outline-offset: 1px; }
.dev-panel-buttons { display: flex; gap: 0.4rem; margin-top: 0.75rem; }
.dev-panel-msg { color: var(--dev-green); margin-top: 0.4rem; min-height: 1em; }
