/* ==========================================================================
   ui/css/ui-core.css
   Version: v3.4.6 (2026-02-04)
   Core-Styles für Panels & Tools (ohne Layout-Shell)
   ========================================================================== */

/* ------------------------------------------------------------
   Panel Layout Basics
   ------------------------------------------------------------ */

/* Panel-Root: wichtig für iPad/iPhone Safari (inneres Scrollen) */
.panel-root{
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden; /* verhindert Body-Scroll; Content scrollt innen */
}

/* Toolbar: sticky + darf NICHT wachsen */
.panel-toolbar{
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 10;

  /* Lesbares, helles Gradient (statt "zu schwarz") */
  background: linear-gradient(to bottom, #ffffff 0%, #f2f4f7 100%);
  color: #1f2937;
  border: 1px solid rgba(0,0,0,.10);
}

/* Buttons in Toolbar etwas heller */
.panel-toolbar button{
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.12);
  color: #111827;
}

/* Rechtsbündiger Status/Hint: nicht umbrechen, bei wenig Platz ellipsis */
.panel-toolbar-right{
  min-width: 0;
}

.panel-toolbar-status{
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48vw;

  /* UX: Status als kleine "Pille" besser lesbar */
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.75);
}

/* Deutlichere Status-Farben je Zustand (ohne grell zu werden) */
.panel-toolbar-status[data-kind="dirty"]{
  background: rgba(255, 214, 102, .35);
  border-color: rgba(255, 214, 102, .55);
}

.panel-toolbar-status[data-kind="saved"]{
  background: rgba(120, 220, 160, .30);
  border-color: rgba(120, 220, 160, .55);
}

.panel-toolbar-status[data-kind="idle"]{
  opacity: .70;
}

/* Disabled-Buttons in Toolbar sichtbar */
.panel-toolbar button:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.panel-toolbar-note{
  font-size: 11px;
  opacity: .75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48vw;
}

/* ------------------------------------------------------------
   Panel Content: der eigentliche Scrollbereich
   ------------------------------------------------------------ */
.panel-content-wrap{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px; /* etwas Luft rechts für Scrollbar */
}

/* ------------------------------------------------------------
   Wizard – kleine, neutrale Zusatz-Styles (v3.5)
   ------------------------------------------------------------ */

.panel-note{
  padding: 10px 12px;
  border: 1px dashed rgba(0,0,0,.20);
  border-radius: 10px;
  margin: 0 0 12px 0;
  opacity: .9;
}

.btn-primary{
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(17,24,39,.92);
  color: #fff;
  cursor: pointer;
}
.btn-primary:hover{
  filter: brightness(1.05);
}

.wizard-moduleRow{
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 10px;
  margin-bottom: 6px;
}

.wizard-moduleLabel{
  font-weight: 600;
}

.wizard-moduleDeps{
  margin-left: auto;
  opacity: .65;
  font-size: 12px;
}

/* =========================================================
   MOBILE: Debug-Köpfe kompakter
   ========================================================= */
@media (max-width: 520px) {
  .card, .panel, .bp-card {
    padding: 10px !important;
    border-radius: 12px;
  }

  h1, h2 {
    font-size: 18px;
    margin: 10px 0 8px;
  }

  .subtitle, .hint, .muted {
    font-size: 13px;
  }

  /* Buttons kleiner */
  button, .btn {
    padding: 8px 10px;
    border-radius: 10px;
  }
}

/* ==========================================================================
   MOBILE COMPACT MODE (GLOBAL) — Panel Toolbar / Head dichter
   Version: v1.0.0-mobile-compact-core (2026-02-06)
   ========================================================================== */

@media (max-width: 520px){

  /* Panel-Kopf/Toolbar enger */
  .panel-toolbar{
    padding: 8px 10px;
  }
  .panel-toolbar-inner{
    gap: 8px;
  }

  /* Titel/Infos kleiner, damit weniger Platz verbrannt wird */
  .panel-toolbar-title{
    font-size: 14px;
    line-height: 1.15;
  }
  .panel-toolbar-desc{
    font-size: 12px;
    line-height: 1.2;
  }

  /* Status rechts: kleiner + nicht zu breit */
  .panel-toolbar-status{
    font-size: 11px;
    padding: 3px 6px;
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Content-Padding etwas reduzieren */
  .panel-content,
  .panel-content-wrap{
    padding: 10px;
  }
}

/* =====================================================================
 * Projekt-Assets – UX (Asset-Karten)
 * ===================================================================== */

.bp-asset-card{
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,.65);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}

.bp-asset-title-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:10px;
}

.bp-asset-title-left{ min-width:0; }

.bp-asset-title{
  font-weight:700;
  line-height:1.15;
}

.bp-asset-sub{
  opacity:.75;
  font-size:12px;
  margin-top:4px;
}

.bp-asset-title-right{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* Buttons/Actions innerhalb der Asset-Karte wirken auf Mobile schnell "gequetscht" –
   ein bisschen Luft hilft enorm. */
.bp-asset-card .btnrow{ gap:8px; flex-wrap:wrap; }
