/* PlanetCareScan — shopping_list.css */
/* Fächer-Liste, Kandidaten, Detail, Add-Modal */

/* ── Custom Elements: Basis-Display ─────────────────────── */
sl-list-view, sl-detail-view,
sl-list-container, sl-add-bar,
sl-candidate-best, sl-candidates-list,
sl-scan-active-banner, sl-result-actions,
sl-result-scan-label {
  display: block;
}
sl-detail-view.hidden,
sl-scan-active-banner.hidden,
sl-result-actions.hidden,
sl-result-scan-label.hidden { display: none; }

/* ── Haupt-ListView ─────────────────────────────────────── */
sl-list-view {
  position: relative;
  min-height: 100%;
  padding-bottom: 80px;
}

/* ── Kategorie-Gruppen ──────────────────────────────────── */
.sl-category-group { margin: 0 0 8px; }

.sl-cat-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-3, #7a9a8a);
  padding: 16px 20px 6px;
}

/* ── Eintrags-Zeilen ────────────────────────────────────── */
.sl-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule, rgba(255,255,255,.06));
  transition: background .12s;
  gap: 12px;
}
.sl-item:active { background: rgba(255,255,255,.04); }
.sl-item-done { opacity: .55; }

.sl-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 10px;
}
.sl-item-left { flex: 1; min-width: 0; }

.sl-item-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink, #e8e8e0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sl-done-text { text-decoration: line-through; color: var(--ink-3, #7a9a8a); }

.sl-last-purchase {
  display: block;
  font-size: 11.5px;
  color: var(--ink-3, #7a9a8a);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sl-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.sl-no-data {
  font-size: 11px;
  color: var(--ink-3, #5a7a6a);
}

.sl-done-check { color: #4ade80; }
.sl-chevron { color: var(--ink-3, #5a7a6a); }

/* Score-Badge in Liste */
.sl-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(232,184,109,.12);
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #e8b86d;
}

/* ── FAB ────────────────────────────────────────────────── */
sl-add-bar {
  position: fixed;
  bottom: calc(var(--tab-h, 56px) + var(--safe-b, 0px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}
.sl-fab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e8b86d;
  color: #0d1f14;
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  font-family: Manrope, sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  white-space: nowrap;
}
.sl-fab svg { width: 18px; height: 18px; }
.sl-fab:active { opacity: .85; transform: scale(.97); }

/* ── Leer-Zustand ───────────────────────────────────────── */
.sl-empty {
  text-align: center;
  padding: 48px 24px 24px;
  color: var(--ink-2, #a0b8a8);
}
.sl-empty p { font-size: 15px; margin: 0 0 6px; }
.sl-empty .muted-sm { font-size: 12.5px; color: var(--ink-3, #5a7a6a); }

/* ── Loading ────────────────────────────────────────────── */
.sl-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--ink-2, #a0b8a8);
  font-size: 14px;
}

/* ── Login-Gate ─────────────────────────────────────────── */
.sl-pro-gate {
  text-align: center;
  padding: 48px 24px;
}
.sl-pro-gate h3 { font-size: 18px; margin: 0 0 8px; color: var(--ink, #e8e8e0); }
.sl-pro-gate p  { font-size: 14px; color: var(--ink-2, #a0b8a8); margin: 0 0 20px; }
.btn-gold {
  background: #e8b86d;
  color: #0d1f14;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  font-family: Manrope, sans-serif;
  cursor: pointer;
}

/* ── Detail-Ansicht ─────────────────────────────────────── */
sl-detail-view {
  position: absolute;
  inset: 0;
  background: var(--paper, #fff);
  overflow-y: auto;
  z-index: 50;
  padding-bottom: 32px;
}

.sl-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--rule, rgba(0,0,0,.08));
  position: sticky;
  top: 0;
  background: var(--paper, #fff);
  z-index: 1;
}
.sl-back-btn {
  background: none;
  border: none;
  color: var(--ink, #e8e8e0);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.sl-back-btn svg { width: 22px; height: 22px; }
.sl-detail-item-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink, #e8e8e0);
}

/* ── Add-Modal ──────────────────────────────────────────── */
.sl-add-modal {
  position: fixed;
  inset: 0;
  z-index: 9980;
}
.sl-add-modal.hidden { display: none; }

.sl-add-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.sl-add-sheet {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: #0d1f14;
  border-radius: 20px 20px 0 0;
  padding: 16px 20px 40px;
  border-top: 1px solid #2d5a3d;
}

.sl-add-handle {
  width: 36px; height: 4px;
  background: #2d5a3d;
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sl-add-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7a9a8a;
  margin-bottom: 10px;
}

.sl-add-input {
  width: 100%;
  background: #0f2016;
  border: 1px solid #2d5a3d;
  border-radius: 10px;
  color: #e8e8e0;
  padding: 13px 14px;
  font-size: 16px;
  font-family: Manrope, sans-serif;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.sl-add-input:focus { border-color: #e8b86d; }
.sl-add-input::placeholder { color: #3a5a4a; }

.sl-add-suggestion {
  font-size: 12px;
  color: #e8b86d;
  margin: 6px 2px 0;
}
.sl-add-suggestion.hidden { display: none; }

.sl-add-footer {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.sl-btn-cancel {
  flex: 1;
  background: none;
  border: 1px solid #2d5a3d;
  border-radius: 10px;
  color: #7a9a8a;
  padding: 12px;
  font-size: 15px;
  font-family: Manrope, sans-serif;
  cursor: pointer;
}
.sl-add-confirm-btn {
  flex: 2;
  background: #e8b86d;
  border: none;
  border-radius: 10px;
  color: #0d1f14;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: Manrope, sans-serif;
  cursor: pointer;
}
.sl-add-confirm-btn:disabled { opacity: .6; cursor: default; }

/* ── Scan-Banner ─────────────────────────────────────────── */
sl-scan-active-banner {
  background: rgba(232,184,109,.12);
  border: 1px solid rgba(232,184,109,.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 16px 20px;
  font-size: 13px;
  color: #e8b86d;
  text-align: center;
}
