/**
 * Der Export-Dialog fuer die eigenen Umsaetze.
 *
 * Alle Klassen tragen den Praefix `in-uex-`. Der Dialog haengt an
 * `document.body`, damit kein Elternteil mit `overflow` ihn beschneidet -
 * deshalb stehen hier auch die Farben ausgeschrieben statt als Token des
 * Intranet-Rahmens.
 */

.in-uex-hintergrund {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.in-uex-dialog {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 28px;
  border-radius: 14px;
  background: #ffffff;
  color: #1b181d;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}

.in-uex-dialog h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.in-uex-erklaerung {
  margin: 0 0 20px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
}

/* ========================================
   ZEITRAUM
   ======================================== */

.in-uex-auswahl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.in-uex-wahl {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  color: #1b181d;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.in-uex-wahl:hover {
  background: #f3f4f6;
}

.in-uex-wahl:focus-visible {
  outline: 2px solid #17233a;
  outline-offset: 2px;
}

.in-uex-wahl--aktiv {
  border-color: #17233a;
  background: #17233a;
  color: #ffffff;
}

.in-uex-frei {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* `display: grid` schlaegt die Voreinstellung von [hidden] - ohne diese
   Regel staenden die beiden Datumsfelder auch bei den festen Zeitraeumen da
   und liessen sich bedienen, ohne etwas zu bewirken. */
.in-uex-frei[hidden] {
  display: none;
}

.in-uex-feld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
}

.in-uex-feld input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #1b181d;
  font: inherit;
}

.in-uex-feld input:focus {
  outline: 2px solid #17233a;
  outline-offset: 1px;
}

/* ========================================
   VORSCHAU
   ======================================== */

.in-uex-vorschau {
  margin: 20px 0 4px;
}

.in-uex-zahlen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.in-uex-kachel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f4f6fb;
}

.in-uex-kachel-label {
  font-size: 12px;
  color: #6b7280;
}

.in-uex-kachel strong {
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Der eigene Anteil ist die Zahl, wegen der der Bericht erzeugt wird. */
.in-uex-kachel--stark {
  background: #17233a;
  color: #ffffff;
}

.in-uex-kachel--stark .in-uex-kachel-label {
  color: rgba(255, 255, 255, 0.75);
}

.in-uex-zeitraum {
  margin: 10px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.in-uex-warnung {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff8ef;
  color: #7a4a12;
  font-size: 13px;
  line-height: 1.5;
}

/* ========================================
   FUSSZEILE
   ======================================== */

.in-uex-fuss {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.in-uex-knopf {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  color: #1b181d;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.in-uex-knopf:hover {
  background: #f3f4f6;
}

.in-uex-knopf:focus-visible {
  outline: 2px solid #17233a;
  outline-offset: 2px;
}

.in-uex-knopf--stark {
  border-color: #17233a;
  background: #17233a;
  color: #ffffff;
}

.in-uex-knopf--stark:hover {
  background: #24344f;
}

.in-uex-knopf[disabled] {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 520px) {
  .in-uex-auswahl,
  .in-uex-frei,
  .in-uex-zahlen {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ========================================
   KNOPF AUF DER ÜBERSICHT
   ======================================== */

.in-dash-exportzeile {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 20px;
}

.in-dash-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--in-line, #e4e7ee);
  border-radius: 10px;
  background: var(--in-card, #ffffff);
  color: var(--in-ink, #1b2130);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.in-dash-export:hover {
  background: var(--in-bg, #f4f6fb);
  border-color: var(--in-gold, #c9a24b);
}

.in-dash-export:focus-visible {
  outline: 2px solid var(--in-gold, #c9a24b);
  outline-offset: 2px;
}

.in-dash-export[disabled] {
  opacity: 0.6;
  cursor: default;
}

@media (max-width: 520px) {
  .in-dash-exportzeile {
    justify-content: stretch;
  }

  .in-dash-export {
    width: 100%;
    justify-content: center;
  }
}
