/* BB Rail Panel — Mobile Work Rail einstellen. Nur lokal aktiv. */

.bbr-toggle {
  display: none;
  position: fixed;
  left: 16px;
  bottom: 56px;
  z-index: 221;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 2px;
  background: rgba(18, 18, 18, .82);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: #fff;
  font: 500 12px/1 Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.bbr-toggle:hover { background: rgba(18, 18, 18, .95); }
.bbr-toggle[data-active] { background: #fff; color: #121212; }

.bbr-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 240;
  display: none;
  flex-direction: column;
  width: 420px;
  max-width: 100vw;
  height: 100dvh;
  background: rgba(255, 255, 255, .98);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  color: #121212;
  font: 400 12px/1.45 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  box-shadow: -8px 0 40px rgba(18, 18, 18, .16);
}
.bbr-panel[data-open] { display: flex; }
.bbr-panel[data-lab] {
  position: relative;
  display: flex;
  width: 100%;
  height: 100dvh;
  box-shadow: none;
  border-right: 1px solid rgba(18, 18, 18, .12);
}

.bbr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(18, 18, 18, .1);
  flex: none;
}
.bbr-title { display: flex; flex-direction: column; gap: 3px; }
.bbr-title strong {
  font: 500 11px/1 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6E6E6E;
}
.bbr-title span { font-weight: 500; color: #121212; }
.bbr-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 2px;
  background: #F5F5F5;
  color: #121212;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.bbr-close:hover { background: #EDEDED; }

.bbr-presets {
  display: flex;
  gap: 4px;
  padding: 12px 16px 8px;
  flex: none;
}
.bbr-preset {
  flex: 1;
  height: 30px;
  border: 1px solid rgba(18, 18, 18, .16);
  border-radius: 2px;
  background: #fff;
  color: #121212;
  font: 500 11px/1 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  cursor: pointer;
}
.bbr-preset:hover { background: #F5F5F5; }
.bbr-preset[data-active] { background: #121212; border-color: #121212; color: #fff; }

/* ---------- Kontext (Desktop vs. Mobil) ---------- */
.bbr-context {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 0 16px 8px;
  padding: 8px 10px;
  border-radius: 2px;
  background: #F5F5F5;
  color: #4A4A4A;
  flex: none;
}
.bbr-context-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9E9E9E;
}
.bbr-context-text { font-size: 11px; line-height: 1.4; }
.bbr-context-btn {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 2px;
  background: #121212;
  color: #fff;
  font: 500 10px/1 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.bbr-context-btn:hover { background: #2D2D2D; }
.bbr-context.is-desktop { background: #FFF6D6; color: #7A5C00; }
.bbr-context.is-desktop .bbr-context-dot { background: #D9A514; }
.bbr-context.is-mobile { background: #EAF7EE; color: #1E7A3C; }
.bbr-context.is-mobile .bbr-context-dot { background: #2E9E54; }

/* ---------- Deaktivierte Folge-Regler ---------- */
.bbr-row.is-disabled { opacity: .45; }
.bbr-row.is-disabled input,
.bbr-row.is-disabled select { pointer-events: none; }
.bbr-row.is-disabled .bbr-reset { pointer-events: none; opacity: .4; }
.bbr-quick {
  display: block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #121212;
  font: 500 11px/1 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  text-decoration: underline;
  cursor: pointer;
}
.bbr-quick:hover { color: #2D2D2D; }
.bbr-quick[hidden] { display: none; }

.bbr-lan {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 4px 16px 8px;
  padding: 8px 10px;
  border-radius: 2px;
  background: #F5F5F5;
  flex: none;
}
.bbr-lan-label {
  font: 500 10px/1.2 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6E6E6E;
}
.bbr-lan-url {
  color: #121212;
  font-size: 11px;
  text-decoration: underline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bbr-copy {
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 2px;
  background: #fff;
  color: #121212;
  font: 500 10px/1 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  cursor: pointer;
}
.bbr-copy:hover { background: #EDEDED; }
.bbr-copy:disabled { opacity: .4; cursor: default; }

.bbr-search { padding: 4px 16px 12px; border-bottom: 1px solid rgba(18, 18, 18, .08); flex: none; }
.bbr-search input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid rgba(18, 18, 18, .18);
  border-radius: 2px;
  background: #fff;
  color: #121212;
  font: inherit;
}

.bbr-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }

.bbr-group { padding: 14px 16px 4px; }
.bbr-group + .bbr-group { border-top: 1px solid rgba(18, 18, 18, .08); }
.bbr-group h3 {
  margin: 0 0 10px;
  font: 500 10px/1 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #6E6E6E;
}

.bbr-row { padding: 8px 0 10px; }
.bbr-row + .bbr-row { border-top: 1px solid rgba(18, 18, 18, .05); }
.bbr-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bbr-row-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bbr-row-title { font-weight: 500; }
.bbr-reset {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #6E6E6E;
  font-size: 13px;
  cursor: pointer;
}
.bbr-reset:hover { background: #F5F5F5; color: #121212; }
.bbr-reset[hidden] { visibility: hidden; display: inline-block; }

.bbr-help { margin: 6px 0 0; color: #6E6E6E; font-size: 11px; line-height: 1.45; }

.bbr-orig-control { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.bbr-orig-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bbr-orig-toggle input { accent-color: #121212; }
.bbr-orig-value { color: #6E6E6E; font-size: 11px; }

.bbr-number { display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; align-items: center; gap: 8px; }
.bbr-number input[type="range"] { width: 100%; accent-color: #121212; }
.bbr-num {
  width: 100%;
  height: 28px;
  padding: 0 6px;
  box-sizing: border-box;
  border: 1px solid rgba(18, 18, 18, .18);
  border-radius: 2px;
  background: #fff;
  color: #121212;
  font: inherit;
}
.bbr-unit { color: #6E6E6E; font-size: 11px; }
.bbr-number[hidden] { display: none; }

.bbr-switch { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; cursor: pointer; }
.bbr-switch input {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: #D6D6D6;
  position: relative;
  transition: background .16s ease;
  cursor: pointer;
}
.bbr-switch input:checked { background: #121212; }
.bbr-switch input:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform .16s cubic-bezier(.22, 1, .36, 1);
}
.bbr-switch input:checked:after { transform: translateX(14px); }

.bbr-select {
  width: 100%;
  height: 32px;
  margin-top: 8px;
  padding: 0 8px;
  box-sizing: border-box;
  border: 1px solid rgba(18, 18, 18, .18);
  border-radius: 2px;
  background: #fff;
  color: #121212;
  font: inherit;
}

.bbr-diag { margin: 18px 16px 0; padding: 12px; border-radius: 2px; background: #F5F5F5; }
.bbr-diag-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font: 500 10px/1 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6E6E6E;
}
.bbr-diag-head span { letter-spacing: 0; text-transform: none; font-weight: 400; }
.bbr-diag-list {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
}
.bbr-diag-list dt { color: #6E6E6E; font-size: 11px; }
.bbr-diag-list dd { margin: 0; font-size: 11px; overflow-wrap: anywhere; }

.bbr-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(18, 18, 18, .1);
  background: rgba(255, 255, 255, .96);
  flex: none;
}
.bbr-status { flex: 1 1 auto; color: #6E6E6E; font-size: 11px; }
.bbr-status[data-error] { color: #B42318; }
.bbr-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(18, 18, 18, .18);
  border-radius: 2px;
  background: #fff;
  color: #121212;
  font: 500 11px/1 Inter, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  cursor: pointer;
}
.bbr-btn:hover { background: #F5F5F5; }
.bbr-btn-primary { background: #121212; border-color: #121212; color: #fff; }
.bbr-btn-primary:hover { background: #2D2D2D; }
.bbr-btn:disabled { opacity: .5; cursor: default; }

@media (max-width: 719px) {
  .bbr-toggle { left: 12px; bottom: 56px; }
  .bbr-panel { width: 100vw; }
  .bbr-lan { grid-template-columns: 1fr auto; }
  .bbr-lan-label { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .bbr-switch input, .bbr-switch input:after { transition: none; }
}
