/* ===== Grundlayout ===== */
.entnahmeplan.ep { box-sizing: border-box; }
.ep { font: var(--e-global-typography-text-font-family), Sans-serif; }
.ep * { box-sizing: inherit; }

.ep .ep-title { margin: 0 0 12px; font-size: 22px; font-weight: 700; }
.ep .ep-subtitle { margin: 16px 0 8px; font-size: 16px; font-weight: 700; }

.ep .ep-form { display: grid; gap: 12px; max-width: 720px; }
.ep .ep-field { display: grid; gap: 6px; }
.ep .ep-label { font-weight: var(--e-global-typography-text-font-weight); }
.ep .ep-input-wrap { display: flex; align-items: center; gap: 8px; }
.ep input[type="text"], .ep select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(127,127,127,0.35);
  border-radius: 8px;
  background: transparent;
  color: inherit;
}
.ep .ep-error { min-height: 1em; font-size: 12px; color: #d33; }

.ep .ep-radio-group { display: grid; gap: 6px; }
.ep .ep-radio-row { display: flex; align-items: center; gap: 8px; }

.ep .ep-adv { border: 1px dashed rgba(127,127,127,0.35); border-radius: 10px; padding: 8px 12px; }
.ep .ep-adv-summary { cursor: pointer; font-weight: 600; }

.ep .ep-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ep .ep-btn, .ep .ep-btn-secondary {
  padding: 10px 14px; border-radius: 10px; border: 0; cursor: pointer;
}
.ep .ep-btn { background: #00CD73; color: #0a0a0a; font-weight: 700; }
.ep .ep-btn-secondary { background: rgba(127,127,127,0.18); color: inherit; }

.ep .ep-summary { margin: 6px 0 16px; }

.ep .ep-results { max-width: 1000px; }
.ep .ep-table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.ep .ep-table th, .ep .ep-table td { border: 1px solid rgba(127,127,127,0.25); padding: 8px 10px; text-align: right; }
.ep .ep-table th:first-child, .ep .ep-table td:first-child { text-align: left; }
.ep .ep-table thead th { background: rgba(127,127,127,0.12); }

.ep .ep-chart-wrap { width: 100%; overflow: auto; margin: 6px 0 4px; }
.ep .ep-chart { display: block; width: 100%; height: auto; }
.ep .ep-chart-desc { font-size: 12px; opacity: .85; }

.ep .ep-totals { display: grid; gap: 6px; border-top: 2px solid #00CD73; padding-top: 8px; }
.ep .ep-total-row { display: flex; justify-content: space-between; }

/* JS-Crash Hinweis */
.ep .ep-errorbox { padding: 12px; border: 1px solid #d33; border-radius: 10px; background: rgba(211,51,51,0.08); }

/* ===== Fokus ===== */
.ep .ep-btn:focus-visible,
.ep .ep-btn-secondary:focus-visible,
.ep input:focus-visible,
.ep select:focus-visible,
.ep summary:focus-visible,
.ep a:focus-visible {
  outline: 3px solid #00CD73;
  outline-offset: 2px;
  border-radius: 6px;
}
.ep .ep-btn:hover { filter: brightness(1.05); }
.ep input[aria-invalid="true"], .ep select[aria-invalid="true"] {
  border: 1px solid #d33 !important;
  box-shadow: 0 0 0 2px rgba(211, 51, 51, 0.15);
}

/* ===== Print ===== */
.ep .ep-print-only { display: none; }

@media print {
  :root, body { background: #fff !important; color: #000 !important; }
  .ep { color: #000; }

  .ep .ep-form,
  .ep #ep-mode,
  .ep .ep-actions,
  .ep .ep-summary:not(.ep-print-only),
  .ep .ep-chart-wrap,
  .ep .ep-btn,
  .ep .ep-btn-secondary,
  .ep select#ep-view {
    display: none !important;
  }

  .ep .ep-title,
  .ep .ep-subtitle,
  .ep .ep-results,
  .ep .ep-table,
  .ep .ep-totals,
  .ep .ep-print-only {
    display: block !important;
  }

  .ep .ep-print-header {
    margin: 0 0 12px 0;
    padding: 8px 0;
    border-bottom: 2px solid #00CD73;
  }
  .ep .ep-print-brand strong { font-size: 16px; }
  .ep .ep-print-brand a { color: #00CD73 !important; text-decoration: none; }
  .ep .ep-print-sep { color: #777; }

  .ep .ep-print-params { margin-top: 12px; font-size: 12px; }
  .ep .ep-param-row { display: flex; gap: 8px; margin: 2px 0; }
  .ep .ep-param-key { width: 220px; font-weight: 600; }

  .ep .ep-table { width: 100%; border-collapse: collapse; margin: 12px 0 16px 0; font-size: 12px; }
  .ep .ep-table th, .ep .ep-table td { border: 1px solid #ddd; padding: 6px 8px; text-align: right; }
  .ep .ep-table th:first-child, .ep .ep-table td:first-child { text-align: left; }
  .ep .ep-table thead th { background: #f4f4f4; }

  .ep .ep-totals { border-top: 2px solid #00CD73; padding-top: 8px; margin-top: 8px; font-size: 12px; }
  .ep .ep-total-row { display: flex; justify-content: space-between; margin: 2px 0; }

  .ep .ep-table { page-break-inside: auto; }
  .ep .ep-table tr { page-break-inside: avoid; page-break-after: auto; }
  .ep .ep-print-header, .ep .ep-print-params, .ep .ep-totals { page-break-inside: avoid; }
}

/* Überschrift im Rechner ausblenden */
.entnahmeplan .ep-title { 
  display: none !important;
}

/* === Select-Dropdowns im dunklen Theme fixen === */
.entnahmeplan select,
.entnahmeplan .ep-input-wrap select {
  background-color: #151515;          /* Feld-Hintergrund */
  color: #F4F4F4;                  /* Feld-Text */
  border: 1px solid #2a2a2a;
}

.entnahmeplan select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #00CD73;   /* CI-Fokus */
  border-color: #00CD73;
}

/* WICHTIG: Popup-Liste der Optionen */
.entnahmeplan select option {
  background-color: #151515 !important;  /* Listen-Hintergrund */
  color: #F4F4F4 !important;             /* Listen-Text */
}

/* Hover/Markierung in der Liste */
.entnahmeplan select option:hover,
.entnahmeplan select option:checked {
  background-color: #1e1e1e !important;
  color: #ffffff !important;
}

/* Optional: einheitliche Höhe & Cursor */
.entnahmeplan select {
  min-height: 44px;
  cursor: pointer;
}
