/* === Darts Checkout Rechner – Layout + Clean Selects + JS Tooltips + Badges === */

.dcr-wrap{
  --dcr-primary: #2C3A3F;
  --dcr-primary-2: #3B4D54;
  --dcr-on-primary: #ffffff;

  --dcr-text: #1f1f1f;
  --dcr-muted: rgba(44,58,63,.72);
  --dcr-border: rgba(44,58,63,.18);
  --dcr-soft: rgba(44,58,63,.06);

  /* Badge Farben passend zum dunklen Schema */
  --dcr-red: #B54A4A;    /* gedecktes Rot */
  --dcr-green: #2F7D57;  /* gedecktes Grün */
  --dcr-gray: rgba(44,58,63,.08);

  --dcr-radius: 16px;

  width: 100%;
  max-width: 720px;

  /* >>> NEU: gesamter Container-Hintergrund grau */
  background: #f3f4f5;

  border: 1px solid var(--dcr-border);
  border-radius: var(--dcr-radius);
  box-shadow: 0 10px 26px rgba(0,0,0,.06);
  overflow: hidden;

  color: var(--dcr-text);
  box-sizing: border-box;
}

/* Titelbar */
.dcr-wrap .dcr-titlebar{
  margin: 0;
  padding: 14px 16px;
  background: var(--dcr-primary);
  color: #fff !important;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .2px;
  line-height: 1.2;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

/* Controls */
.dcr-head{
  width: 100%;
  padding: 12px 16px;

  /* Header bleibt hell */
  background: #fff;

  border-bottom: 1px solid var(--dcr-border);
  box-sizing: border-box;
}

.dcr-controls{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  box-sizing: border-box;
}

/* Toggle Pills */
.dcr-mode{
  width: 100%;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  justify-content:flex-start;
}

.dcr-toggle{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dcr-toggle input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.dcr-toggle > span{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--dcr-border);
  background: #fff;
  font-size: 13px;
  color: var(--dcr-muted);
  line-height: 1;
  user-select:none;
  transition: transform .08s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.dcr-toggle input:checked + span{
  background: var(--dcr-primary);
  color: var(--dcr-on-primary);
  border-color: var(--dcr-primary);
}

.dcr-toggle > span:active{ transform: scale(.98); }

/* Settings Grid (2 Spalten) */
.dcr-settings{
  width: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: end;
  box-sizing: border-box;
}

.dcr-field{
  display:flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Labels: größer + näher am Dropdown */
.dcr-field__label{
  display:flex;
  align-items:center;
  gap: 6px;
  font-size: 13px;
  color: var(--dcr-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

/* Info Icon */
.dcr-wrap .dcr-help{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.05);
  color: currentColor;
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  position: relative;
  outline: none;
}

.dcr-toggle input:checked + span .dcr-help{
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.12);
}

/* ===== Selects: sauberer Dropdown (ein Pfeil rechts + dunkles Feld) ===== */

.dcr-selectwrap{
  position: relative;
  width: 100%;
  height: 44px; /* exakt Feldhöhe */
  margin: 0 !important;
}

/* dunkles Feld rechts */
.dcr-selectwrap::after{
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 44px;
  width: 44px;
  background: var(--dcr-primary);
  border-radius: 0 12px 12px 0;
  pointer-events: none;
}

/* Pfeil */
.dcr-selectwrap::before{
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #fff;
  transform: translateY(-20%);
  pointer-events: none;
  z-index: 2;
}

.dcr-select{
  width: 100%;
  height: 44px;

  border: 1px solid var(--dcr-border);
  border-radius: 12px;

  padding: 0 56px 0 12px; /* Platz für Pfeil-Feld rechts */
  background-color: #fff !important;

  color: var(--dcr-text);
  font-size: 14px;

  outline:none;
  box-sizing: border-box;

  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Theme-Pfeile killen + Theme-margin reset */
  margin: 0 !important;
  background-image: none !important;
  background-repeat: no-repeat !important;
  box-shadow: none;
}

.dcr-select:focus{
  border-color: rgba(44,58,63,.45);
  box-shadow: 0 0 0 4px rgba(44,58,63,.12);
}

.dcr-select::-ms-expand{ display:none; }

/* Input row */
.dcr-row{
  width: 100%;
  padding: 14px 16px;
  box-sizing: border-box;

  /* >>> NEU: grauer Bereich hat trotzdem ein sauberes Feld */
  background: transparent;
}

.dcr-input{
  width: 100%;
  max-width: 300px;
  margin: 0 !important;

  border: 3px solid rgba(44,58,63,.28) !important; /* >>> 3px */
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 15px;
  outline: none;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease;
  box-sizing: border-box;
}

.dcr-input:focus{
  border-color: rgba(44,58,63,.55) !important;
  box-shadow: 0 0 0 4px rgba(44,58,63,.12) !important;
}

/* Output */
.dcr-out{
  width: 100%;
  padding: 0 16px 16px;
  box-sizing: border-box;

  /* >>> NEU: Output Bereich liegt auf dem grauen Container */
  background: transparent;
}

.dcr-block{
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--dcr-border);
}

.dcr-h{
  font-weight: 900;
  margin-bottom: 8px;
  font-size: 15px;
}

/* Mehr Platz links für Nummerierung */
.dcr-list{
  margin: 0;
  padding-left: 34px;
}

.dcr-list li{
  margin: 10px 0;
  padding-left: 6px;
}

/* ===== ROUTE als Badge-Row ===== */
.dcr-route{
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  font-size: 14px;
}

/* Badge */
.dcr-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  letter-spacing: .2px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.dcr-badge--t{
  background: var(--dcr-red);
  color: #fff;
}

.dcr-badge--d{
  background: var(--dcr-green);
  color: #fff;
}

.dcr-badge--s{
  background: var(--dcr-gray);
  color: var(--dcr-primary);
  border-color: rgba(44,58,63,.18);
}

/* Pfeil zwischen Badges */
.dcr-arrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 0 8px;
  color: rgba(44,58,63,.55);
  font-weight: 900;
  user-select: none;
}

/* Messages */
.dcr-msg{
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid var(--dcr-border);
  background: rgba(44,58,63,.04);
}

.dcr-msg--warn{
  border-color: rgba(180,120,0,.28);
  background: rgba(255, 200, 80, .16);
}

.dcr-msg--bad{
  border-color: rgba(180,0,0,.25);
  background: rgba(255, 60, 60, .12);
}

/* Plan B Box: >>> innen weiss */
.dcr-planb{
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--dcr-border);
  background: #fff; /* >>> NEU */
}

/* Plan B Überschrift kann bleiben */
.dcr-planb-title{
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--dcr-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* >>> Bullet im PlanB komplett entfernen */
.dcr-planb-list{
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

.dcr-planb-list li{
  margin: 0 !important;
  padding-left: 0 !important;
}

/* "Wenn" nicht fett */
.dcr-planb-when{
  font-weight: 400;
  color: var(--dcr-text);
}

/* kleines ":" */
.dcr-planb-colon{
  margin: 0 8px 0 2px;
  color: rgba(44,58,63,.55);
  font-weight: 700;
}

/* Plan B Zeile */
.dcr-planb-line{
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.dcr-planb-then{
  font-weight: 400;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
}

.dcr-setup{
  margin-top: 6px;
  font-size: 16px;
  color: var(--dcr-text);
}

/* ===== JS Tooltip (clamped, min 8px zum Rand) ===== */

/* alte pseudo-tooltips komplett deaktivieren */
.dcr-wrap .dcr-help::before,
.dcr-wrap .dcr-help::after{
  content: none !important;
}

.dcr-float-tip{
  position: fixed;
  z-index: 99999;
  max-width: min(320px, calc(100vw - 16px));
  background: #0f1518;
  color: #fff;
  padding: 10px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.dcr-float-tip::before{
  content: "";
  position: absolute;
  left: var(--dcr-arrow-left, 20px);
  top: -6px;
  border: 6px solid transparent;
  border-bottom-color: #0f1518;
}

.dcr-float-tip.dcr-tip--above::before{
  top: auto;
  bottom: -6px;
  border-bottom-color: transparent;
  border-top-color: #0f1518;
}

/* Responsive */
@media (max-width: 600px){
  .dcr-settings{ grid-template-columns: 1fr; }
}

/* Hand-Cursor für klickbare Elemente */
.dcr-wrap .dcr-select,
.dcr-wrap .dcr-toggle > span{
  cursor: pointer;
}