/* ============================================================================
   p86 Welle zwei, Punkt vier (2026-08-04) · Profileditor · Leagues und Events
   ----------------------------------------------------------------------------
   Die Werte sind bewusst aus der Clubs-Schublade uebernommen (ai-drawer in
   clubs-04-modules.css, pf-* in clubs-03-results.css), damit die Schublade in
   allen drei Editionen identisch aussieht und sich identisch verhaelt. Clubs
   ist der Leitindikator; Leagues und Events ziehen nach.

   Formensprache 2-4 px, keine Schatten ausser der Ueberlagerung der Schublade
   selbst, Farben ausschliesslich aus der Palette.
   ========================================================================== */

.pe-scrim {
  position: fixed;
  inset: 0;
  background: rgba(13, 61, 45, 0.42);
  z-index: 99;
}
.pe-scrim[hidden] { display: none; }

.pe-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 100vw);
  max-width: 460px;
  background: var(--white, #FFFDF9);
  z-index: 100;
  box-shadow: -8px 0 28px rgba(20, 32, 35, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.pe-drawer:not([hidden]) { transform: translateX(0); }
.pe-drawer[hidden] { display: flex !important; }  /* Ausfahrt bleibt sichtbar */
.pe-inner { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

.pe-head {
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--line, #E1DFDB);
  background: var(--paper, #F7F5F0);
}
.pe-eyebrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pe-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  background: rgba(21, 102, 29, 0.12);
  color: #15661D;
  border: 1px solid rgba(21, 102, 29, 0.35);
}
.pe-close {
  appearance: none;
  background: none;
  border: 0;
  font-size: 15px;
  line-height: 1;
  color: var(--muted, #4A4A48);
  cursor: pointer;
  padding: 4px;
}
.pe-close:hover { color: var(--ink, #0D3D2D); }
.pe-close:focus-visible { outline: 2px solid var(--gold, #EB7033); outline-offset: 2px; border-radius: 2px; }
.pe-head h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.25; color: var(--ink, #0D3D2D); }
.pe-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; color: var(--muted, #4A4A48); }

.pe-body { flex: 1 1 auto; overflow-y: auto; padding: 20px 22px 26px; }
.pe-intro {
  font-size: 12.5px;
  color: var(--ink-soft, #1E4C39);
  line-height: 1.5;
  margin: 0 0 18px;
  padding: 10px 12px;
  background: rgba(21, 102, 29, 0.06);
  border-left: 3px solid #15661D;
  border-radius: 0 3px 3px 0;
}

.pe-field { margin-bottom: 22px; }
.pe-field:last-of-type { margin-bottom: 8px; }
.pe-field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft, #1E4C39);
  margin-bottom: 4px;
}
.pe-field-q { font-size: 13.5px; color: var(--ink, #0D3D2D); margin-bottom: 4px; line-height: 1.4; }
.pe-field-desc { font-size: 11.5px; color: var(--muted, #4A4A48); line-height: 1.45; margin-bottom: 10px; }
.pe-field-note { font-size: 11px; color: var(--muted, #4A4A48); margin-top: 6px; font-style: italic; }

.pe-options { display: grid; gap: 6px; }
.pe-option {
  display: grid;
  grid-template-columns: 14px 1fr;
  column-gap: 10px;
  row-gap: 2px;
  align-items: start;
  padding: 9px 12px;
  border: 1px solid var(--line, #E1DFDB);
  border-radius: 3px;
  background: var(--paper, #F7F5F0);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  font-size: 13px;
}
.pe-option:hover { background: rgba(21, 102, 29, 0.06); }
.pe-option input[type="radio"] {
  appearance: none;
  width: 14px; height: 14px;
  border: 1.5px solid var(--line, #E1DFDB);
  border-radius: 50%;
  flex: 0 0 auto;
  margin: 3px 0 0;
  cursor: pointer;
}
.pe-option input[type="radio"]:checked {
  border-color: #15661D;
  background: radial-gradient(circle, #15661D 0%, #15661D 38%, transparent 42%);
}
.pe-option:has(input:checked) { border-color: #15661D; background: rgba(21, 102, 29, 0.08); }
.pe-option-text { font-weight: 600; color: var(--ink, #0D3D2D); line-height: 1.35; }
.pe-option-desc { grid-column: 2; font-size: 11.5px; font-weight: 400; color: var(--muted, #4A4A48); line-height: 1.45; }

.pe-select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line, #E1DFDB);
  border-radius: 3px;
  background: var(--paper, #F7F5F0);
  color: var(--ink, #0D3D2D);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.pe-select:focus-visible { outline: 2px solid #15661D; outline-offset: 1px; }
.pe-select:disabled { color: var(--muted, #4A4A48); cursor: not-allowed; opacity: 0.6; }
.pe-chip-add { margin-top: 8px; }

.pe-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.pe-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 2px;
  background: rgba(0, 111, 138, 0.10);
  border: 1px solid rgba(0, 111, 138, 0.35);
  color: #00505F;
  font-size: 12px;
  font-weight: 600;
}
.pe-chip-x {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  color: #00505F;
  cursor: pointer;
}
.pe-chip-x:hover { color: #690808; }
.pe-chip-empty { font-size: 11.5px; color: var(--muted, #4A4A48); font-style: italic; }

.pe-preview {
  margin-top: 6px;
  padding: 12px 14px;
  background: rgba(21, 102, 29, 0.06);
  border: 1px dashed rgba(21, 102, 29, 0.35);
  border-radius: 3px;
  font-size: 12.5px;
  color: var(--ink-soft, #1E4C39);
}
.pe-preview-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pe-preview-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted, #4A4A48); }
.pe-preview-value { font-size: 14px; font-weight: 600; color: #15661D; font-variant-numeric: tabular-nums; }
.pe-preview-delta { font-size: 11.5px; color: var(--muted, #4A4A48); margin-top: 6px; }

.pe-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.pe-btn {
  appearance: none;
  padding: 10px 16px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.pe-btn-secondary { background: transparent; border-color: var(--line, #E1DFDB); color: var(--ink-soft, #1E4C39); }
.pe-btn-secondary:hover { border-color: var(--ink-soft, #1E4C39); color: var(--ink, #0D3D2D); }
.pe-btn-primary { background: #15661D; color: #F7F5F0; }
.pe-btn-primary:hover { background: #0D3D14; }
.pe-btn-primary:disabled { background: #93B8AC; cursor: not-allowed; }
.pe-btn:focus-visible { outline: 2px solid var(--gold, #EB7033); outline-offset: 2px; }

/* Ausloeser in der Statistikreihe des Ergebnisses — Textknopf, keine Flaeche. */
.pe-open-link {
  display: block;
  margin: 4px auto 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--coral-dark, #B4551D);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.pe-open-link:hover { color: #953B0F; }
.pe-open-link:focus-visible { outline: 2px solid var(--gold, #EB7033); outline-offset: 2px; border-radius: 2px; }

@media (max-width: 640px) {
  .pe-drawer { width: 100vw; max-width: 100vw; }
  .pe-head { padding: 18px 16px 12px; }
  .pe-body { padding: 16px 16px 22px; }
}
