/*
 * AgrarMarkt: Originalgroessen wiederhergestellt, Verwarnungs-Popup behalten.
 * 13.11.2026 · Hotfix nach Dashboard-Kompakt.
 *
 * WICHTIG: Es gibt bewusst KEINE Regeln mehr fuer Dashboard-KPIs,
 * Begruessung, Lager, Schnellzugriff, Garage, Vieh-/Zuechtermarkt
 * oder Spielerhandel. Dort gilt wieder ausschliesslich das bisherige
 * Design der Homepage (Schrift, Abstaende, Hoehen, Fahrzeugkarten).
 *
 * Das vorhandene dashboard-compact.js bleibt unveraendert und stellt
 * die einklappbare Verwarnungsleiste und den Popup-Dialog bereit.
 */

/* In der Uebersicht: nur die kompakte Verwarnungs-Statusleiste. */
body.am-dash-compact #dashboardWarnings.am236-panel:not(.am-dash-open) {
  margin: 0;
  padding: 0;
  border: 1px solid #285b47;
  border-radius: 11px;
  background: linear-gradient(100deg, #0f4035, #092e2b 80%);
  box-shadow: none;
  overflow: hidden;
}
body.am-dash-compact #dashboardWarnings.am236-panel:not(.am-dash-open) > :not(.am-dash-bar) {
  display: none !important;
}
body.am-dash-compact #dashboardWarnings.am236-panel:not(.am-dash-open) > .am-dash-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 65px;
  padding: 13px 17px;
}
.am-dash-bar .am-dash-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(114, 204, 113, .35);
  border-radius: 10px;
  background: #174b36;
  color: #a4e980;
}
.am-dash-bar .am-dash-icon svg {
  width: 20px;
  height: 20px;
}
.am-dash-bar .am-dash-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.am-dash-bar .am-dash-text strong {
  color: #e6f5e4;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.am-dash-bar .am-dash-text small {
  color: #aac7b8;
  font-size: 13px;
  line-height: 1.35;
}
body.am-dash-compact #dashboardWarnings.am236-panel .am-dash-more {
  flex-shrink: 0;
  padding: 9px 13px;
  min-height: 38px;
  border: 1px solid #397452;
  border-radius: 8px;
  background: #174934;
  color: #e1f7df;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
}
body.am-dash-compact #dashboardWarnings.am236-panel .am-dash-more:hover,
body.am-dash-compact #dashboardWarnings.am236-panel .am-dash-more:focus-visible {
  background: #245e3d;
  border-color: #6ebd72;
}
body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-warning:not(.am-dash-open) {
  border-color: #91704a;
  background: linear-gradient(100deg, #443220, #092e29);
}
body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-warning .am-dash-icon {
  border-color: #8c694a;
  background: #5b3c21;
  color: #f1bb77;
}

/* Der bestehende Popup-Dialog inkl. aller Funktionen bleibt erhalten. */
.am-dash-backdrop[hidden],
.am-dash-close[hidden] {
  display: none !important;
}
.am-dash-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 12, 11, .75);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
body.am-dash-modal {
  overflow: hidden !important;
}
body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-open {
  position: fixed !important;
  inset: 4vh auto auto 50%;
  transform: translateX(-50%);
  z-index: 100001;
  width: min(94vw, 1050px);
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0;
  border: 1px solid #39714e;
  border-radius: 13px;
  background: #082b29;
  box-shadow: 0 24px 84px rgba(0, 0, 0, .74);
}
body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-open .am-dash-bar {
  display: none !important;
}
body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-open > .am236-header {
  padding-right: 78px;
}
body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-open .am-dash-close {
  position: absolute;
  top: 15px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #3c7355;
  border-radius: 9px;
  background: #174135;
  color: #e8f6e8;
  cursor: pointer;
}
body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-open .am-dash-close:hover,
body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-open .am-dash-close:focus-visible {
  background: #26614b;
  border-color: #7bc58c;
}
.am-dash-close svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 600px) {
  body.am-dash-compact #dashboardWarnings.am236-panel:not(.am-dash-open) > .am-dash-bar {
    flex-wrap: wrap;
    padding: 12px;
  }
  body.am-dash-compact #dashboardWarnings.am236-panel .am-dash-more {
    margin-left: 50px;
  }
  body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-open {
    width: 97vw;
    max-height: 95vh;
    top: 2vh;
  }
  body.am-dash-compact #dashboardWarnings.am236-panel.am-dash-open > .am236-header {
    padding-right: 60px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.am-dash-compact #dashboardWarnings.am236-panel *,
  .am-dash-backdrop {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
