/* Plugin: addon-manager — UI pour gérer les EdenAddons (plugins per-user). */

.am-float-window {
  position: fixed;
  display: flex;
  flex-direction: column;
  background: rgba(8, 14, 28, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-lg, 8px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 24px rgba(195, 158, 224, 0.18);
  overflow: hidden;
  font-family: var(--font-ui, ui-sans-serif, system-ui);
  color: var(--fg, #d8e0f0);
  animation: am-in 0.22s ease-out;
}
@keyframes am-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
.am-float-window.am-maximized { border-radius: 0; box-shadow: none; }

.am-float-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  height: 32px; padding: 0 12px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: grab; user-select: none;
}
.am-float-title { font-size: 13px; font-weight: 500; }
.am-float-title::before { content: "🧩 "; }
.am-float-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: rgba(8, 14, 28, 0.85); }

.am-banner {
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.am-banner code {
  background: rgba(0,0,0,0.25);
  padding: 1px 4px;
  border-radius: 2px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
}
.am-banner-warn {
  background: rgba(245, 158, 11, 0.10);
  border-left: 3px solid #f59e0b;
  color: #fde68a;
}
.am-banner-info {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  color: #d8e0f0;
}

.am-toolbar {
  display: flex; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  align-items: center;
}
.am-toolbar button {
  background: rgba(195, 158, 224, 0.15);
  border: 1px solid rgba(195, 158, 224, 0.30);
  color: #d8e0f0;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.am-toolbar button:hover { background: rgba(195, 158, 224, 0.25); }
.am-toolbar button.secondary {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}
.am-toolbar .am-count { margin-left: auto; font-size: 11px; color: #7a8694; }

.am-list { flex: 1; overflow-y: auto; padding: 8px; }
.am-empty { padding: 40px 20px; text-align: center; color: #7a8694; font-size: 13px; }

.am-addon {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  margin-bottom: 8px;
  padding: 12px 14px;
}
.am-addon:hover { border-color: rgba(195, 158, 224, 0.25); }
.am-addon-head { display: flex; align-items: center; gap: 10px; }
.am-addon-icon { font-size: 20px; flex-shrink: 0; }
.am-addon-status {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: #7a8694;
}
.am-addon-status.enabled { background: #7adf9c; box-shadow: 0 0 6px rgba(122, 223, 156, 0.6); }
.am-addon-status.disabled { background: #f59e0b; }
.am-addon-name { font-size: 14px; font-weight: 500; flex: 1; }
.am-addon-meta { font-size: 11px; color: #7a8694; font-family: ui-monospace, monospace; }
.am-addon-actions { display: flex; gap: 4px; }
.am-addon-actions button {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: #d8e0f0;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
}
.am-addon-actions button:hover { background: rgba(255,255,255,0.10); }
.am-addon-actions button.danger {
  background: rgba(255, 117, 133, 0.10);
  border-color: rgba(255, 117, 133, 0.30);
}
.am-addon-actions button.danger:hover { background: rgba(255, 117, 133, 0.20); }
.am-addon-desc { margin-top: 6px; font-size: 12px; color: #b0bac8; }
.am-addon-caps {
  margin-top: 4px;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.am-addon-cap {
  font-size: 10px; padding: 1px 6px; border-radius: 9px;
  background: rgba(195, 158, 224, 0.10);
  border: 1px solid rgba(195, 158, 224, 0.25);
  color: #c39ee0;
  font-family: ui-monospace, monospace;
}

/* Modal create / edit */
.am-modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: am-in 0.18s ease-out;
}
.am-modal {
  background: rgba(8, 14, 28, 0.98);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 20px;
  min-width: 480px; max-width: 720px; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.am-modal h2 { margin: 0 0 14px; font-size: 14px; font-weight: 500; color: #c39ee0; }
.am-modal label { display: block; font-size: 11px; color: #7a8694; margin-bottom: 4px; }
.am-modal input[type=text], .am-modal textarea {
  width: 100%;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.10);
  color: #d8e0f0;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  margin-bottom: 12px;
}
.am-modal textarea {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  min-height: 200px;
  resize: vertical;
}
.am-modal input[type=text]:focus, .am-modal textarea:focus { outline: none; border-color: rgba(195, 158, 224, 0.5); }
.am-modal-caps {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.am-modal-caps label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #d8e0f0;
  padding: 4px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 4px;
  cursor: pointer;
  margin: 0;
}
.am-modal-buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.am-modal-buttons button {
  background: rgba(195, 158, 224, 0.15);
  border: 1px solid rgba(195, 158, 224, 0.30);
  color: #d8e0f0;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.am-modal-buttons button.cancel {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}
.am-modal-error {
  background: rgba(255,117,133,0.10);
  border: 1px solid rgba(255,117,133,0.3);
  color: #ff7585;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 10px;
}

/* Edit modal : tabs files */
.am-edit-tabs {
  display: flex; gap: 4px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 4px;
}
.am-edit-tab {
  padding: 4px 10px;
  font-size: 11px;
  font-family: ui-monospace, monospace;
  color: #7a8694;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}
.am-edit-tab.active {
  color: #c39ee0;
  background: rgba(195, 158, 224, 0.10);
  border-color: rgba(195, 158, 224, 0.25);
}
.am-edit-tab.dirty::after { content: ' •'; color: #f59e0b; }
.am-edit-add-file { padding: 4px 8px; font-size: 10px; color: #7adf9c; cursor: pointer; }
