/* =========================================================
   Stall Dienstplan – Frontend CSS (mobile-first)
   Themes: light | blue | green | dark
   Umschalten per data-stall-theme auf .stall-app
   ========================================================= */

/* ---------- DEFAULT THEME (blue) ---------- */
.stall-app{
  /* Farben */
  --stall-bg:#ffffff;
  --stall-card:#ffffff;
  --stall-text:#0f172a;
  --stall-muted: rgba(15,23,42,.70);
  --stall-border: rgba(0,0,0,.10);
  --stall-shadow: 0 10px 30px rgba(0,0,0,.06);
  --stall-pill: rgba(0,0,0,.06);
  --stall-dayBg: linear-gradient(180deg, rgba(0,0,0,.03), transparent);

  --stall-primary:#1d4ed8;     /* BLUE default */
  --stall-primaryText:#ffffff;

  --stall-dangerBg: rgba(239,68,68,.14);
  --stall-dangerText:#b91c1c;

  --stall-warnText:#92400e;

  background: var(--stall-bg);
  color: var(--stall-text);
}

/* ---------- THEME: light ---------- */
.stall-app[data-stall-theme="light"]{
  --stall-primary:#111827;
  --stall-primaryText:#ffffff;
}

/* ---------- THEME: blue ---------- */
.stall-app[data-stall-theme="blue"]{
  --stall-primary:#1d4ed8;
  --stall-primaryText:#ffffff;
}

/* ---------- THEME: green ---------- */
.stall-app[data-stall-theme="green"]{
  --stall-primary:#047857;
  --stall-primaryText:#ffffff;
}

/* ---------- THEME: dark ---------- */
.stall-app[data-stall-theme="dark"]{
  --stall-bg:#0b1220;
  --stall-card:#0f172a;
  --stall-text:#e5e7eb;
  --stall-muted: rgba(229,231,235,.72);
  --stall-border: rgba(255,255,255,.10);
  --stall-shadow: 0 10px 30px rgba(0,0,0,.40);
  --stall-pill: rgba(255,255,255,.08);
  --stall-dayBg: linear-gradient(180deg, rgba(255,255,255,.05), transparent);

  --stall-primary:#60a5fa;
  --stall-primaryText:#0b1220;

  --stall-dangerBg: rgba(239,68,68,.18);
  --stall-dangerText:#fecaca;

  --stall-warnText:#fde68a;
}

/* =========================================================
   Layout & Components (mobile-first)
   ========================================================= */
.stall-wrap{
  max-width:980px;
  margin:0 auto;
  padding:12px;
}

.stall-card{
  background: var(--stall-card);
  border:1px solid var(--stall-border);
  border-radius:18px;
  padding:14px;
  box-shadow: var(--stall-shadow);
}

.stall-top{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:12px;
}

.stall-title{
  font-size:18px;
  font-weight:900;
  margin:0;
}

.stall-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

.stall-pill{
  padding:7px 11px;
  border-radius:999px;
  background: var(--stall-pill);
  font-size:13px;
  line-height:1;
  color: var(--stall-text);
}

.stall-pill.warn{ background: rgba(234,179,8,.18); }
.stall-pill.ok{ background: rgba(34,197,94,.18); }

.stall-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.stall-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  background: var(--stall-primary);
  color: var(--stall-primaryText);
  text-decoration:none;
  font-weight:900;
  font-size:13px;
}

.stall-link.secondary{
  background: var(--stall-pill);
  color: var(--stall-text);
}

.stall-themebar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:6px;
}

.stall-themebtn{
  border:1px solid var(--stall-border);
  background: var(--stall-pill);
  color: var(--stall-text);
  border-radius:12px;
  padding:8px 10px;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
}

.stall-themebtn.is-active{
  outline:2px solid var(--stall-primary);
}

/* Mobile-friendly list calendar */
.stall-days{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

.stall-day{
  border:1px solid var(--stall-border);
  border-radius:16px;
  padding:12px;
  background: var(--stall-dayBg);
}

.stall-day-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.stall-day-date{ font-weight:900; }
.stall-day-sub{
  opacity:.78;
  font-size:13px;
  color: var(--stall-muted);
}

.stall-slots{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.stall-slot{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:12px;
  border-radius:14px;
  background: var(--stall-card);
  border:1px solid var(--stall-border);
}

.stall-name{
  font-weight:900;
  font-size:14px;
}

.stall-info{
  opacity:.78;
  font-size:13px;
  margin-top:3px;
  color: var(--stall-muted);
}

.stall-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:900;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background: var(--stall-pill);
}

.stall-btn{
  border:0;
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
  white-space:nowrap;
}

.stall-btn.primary{ background: var(--stall-primary); color: var(--stall-primaryText); }
.stall-btn.danger{ background: var(--stall-dangerBg); color: var(--stall-dangerText); }
.stall-btn.warn{ background: rgba(234,179,8,.18); color: var(--stall-warnText); }

.stall-btn.disabled{
  background: rgba(0,0,0,.10);
  color: rgba(0,0,0,.45);
  cursor:not-allowed;
}

.stall-app[data-stall-theme="dark"] .stall-btn.disabled{
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.45);
}

.stall-section{ margin-top:14px; }
.stall-section h3{ margin:0 0 10px 0; font-size:15px; font-weight:900; }

.stall-form{ display:flex; flex-direction:column; gap:10px; }
.stall-row{ display:flex; gap:10px; flex-wrap:wrap; }
.stall-row > *{ flex: 1 1 140px; }

.stall-input, .stall-select{
  width:100%;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--stall-border);
  background: var(--stall-card);
  color: var(--stall-text);
}

.stall-foot{
  margin-top:12px;
  font-size:13px;
  opacity:.88;
  line-height:1.4;
  color: var(--stall-muted);
}

@media (min-width:900px){
  .stall-top{
    flex-direction:row;
    align-items:flex-start;
    justify-content:space-between;
  }
}