/* MODULE: member-loadout – Pro-User-Loadout im Profil + Members-Modal
   Nutzt Design-System-Variablen aus base.css (LIGHT-Theme). */

.ml-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 16px;
}

.ml-empty {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  margin: 14px 0;
}

/* ── Item-Karte ───────────────────────────────────────────── */
.ml-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.07));
  border-radius: 10px;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.ml-item:hover {
  border-color: rgba(255,107,0,0.28);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ml-item-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-3, #EFEFF2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ml-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ml-item-thumb--empty,
.ml-item-thumb.is-broken {
  color: var(--text-faint, #ABABBA);
  font-size: 24px;
}
.ml-item-thumb.is-broken img { display: none; }

.ml-item-body {
  min-width: 0;
}
.ml-item-name {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #1A1A2E);
  word-wrap: break-word;
}
.ml-item-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.ml-item-tag,
.ml-item-weight {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.ml-item-tag {
  background: rgba(255,107,0,0.12);
  color: var(--accent, #FF6B00);
}
.ml-item-weight {
  background: var(--bg-3, #EFEFF2);
  color: var(--text-muted, #6B6B80);
}
.ml-item-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted, #6B6B80);
  line-height: 1.45;
  word-wrap: break-word;
}

/* ── Action-Buttons ───────────────────────────────────────── */
.ml-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.ml-btn {
  background: transparent;
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  color: var(--text, #1A1A2E);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.ml-btn:hover:not(:disabled) {
  background: var(--bg-3, #EFEFF2);
  border-color: rgba(0,0,0,0.2);
}
.ml-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.ml-btn--del:hover:not(:disabled) {
  background: rgba(220,38,38,0.08);
  border-color: rgba(220,38,38,0.4);
  color: #dc2626;
}
.ml-btn--save {
  background: var(--accent, #FF6B00);
  border-color: var(--accent, #FF6B00);
  color: #fff;
  width: auto;
  padding: 0 18px;
  height: 38px;
  font-weight: 700;
}
.ml-btn--save:hover { background: var(--accent-light, #FF8C3A); }
.ml-btn--cancel {
  width: auto;
  padding: 0 14px;
  height: 38px;
}

/* ── Form (inline edit / add) ─────────────────────────────── */
.ml-form {
  background: var(--bg-2, #F7F7F9);
  border: 1px solid var(--border, rgba(0,0,0,0.07));
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ml-form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ml-form-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #6B6B80);
  letter-spacing: 0.2px;
}
.ml-form-row input,
.ml-form-row textarea {
  font: inherit;
  color: var(--text, #1A1A2E);
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.12));
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
}
.ml-form-row input:focus,
.ml-form-row textarea:focus {
  outline: 2px solid rgba(255,107,0,0.3);
  outline-offset: 1px;
  border-color: var(--accent, #FF6B00);
}
.ml-form-row textarea { resize: vertical; min-height: 64px; }
.ml-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* ── Status-Zeile ─────────────────────────────────────────── */
.ml-status {
  font-size: 13px;
  min-height: 18px;
  margin: 2px 0 10px;
  color: var(--text-muted, #6B6B80);
}
.ml-status--ok  { color: #16a34a; }
.ml-status--err { color: #dc2626; }
.ml-status--info { color: var(--accent, #FF6B00); }

/* ── View-Variante (fremde Loadouts) ──────────────────────── */
.ml-item--view {
  grid-template-columns: 60px 1fr;
}

/* ── Loadout-Section-Wrapper ──────────────────────────────── */
.ml-section-intro {
  color: var(--text-muted, #6B6B80);
  font-size: 14px;
  margin: 0 0 12px;
}

/* ── Banner auf loadout.html (eingeloggte Mitglieder) ─────── */
.ml-public-banner {
  background: rgba(255,107,0,0.08);
  border: 1px solid rgba(255,107,0,0.3);
  color: var(--text, #1A1A2E);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin: 0 auto 20px;
  max-width: 900px;
  text-align: center;
}
.ml-public-banner a {
  color: var(--accent, #FF6B00);
  font-weight: 700;
  text-decoration: none;
}
.ml-public-banner a:hover { text-decoration: underline; }

/* ── Add-Button ───────────────────────────────────────────── */
.ml-add-btn {
  margin-top: 4px;
}

/* ── Mobile-Responsive ────────────────────────────────────── */
@media (max-width: 550px) {
  .ml-item {
    grid-template-columns: 48px 1fr;
    gap: 10px;
    padding: 10px;
  }
  .ml-item-thumb {
    width: 48px;
    height: 48px;
  }
  .ml-item-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--border, rgba(0,0,0,0.07));
  }
  .ml-item--view {
    grid-template-columns: 48px 1fr;
  }
  .ml-item--view .ml-item-actions { display: none; }
  .ml-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 400px) {
  .ml-item-name { font-size: 14px; }
  .ml-item-desc { font-size: 12px; }
}
