/* HALEX-M AI panel styles. Black onyx with gold and teal accents.
   Theme-variable friendly: host themes can override the variables. */

.halex-m-ai-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #d4af37;
  background: var(--panel, #141414);
  color: #d4af37;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}

.halex-m-ai-button:hover,
.halex-m-ai-button:focus {
  border-color: #2dd4bf;
  color: #2dd4bf;
  outline: none;
}

.halex-m-ai-panel {
  position: fixed;
  right: 16px;
  bottom: 64px;
  z-index: 9999;
  width: min(380px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 96px));
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--accent, #d4af37);
  background: var(--panel, #141414);
  color: var(--text, #f3f3f3);
  font-family: var(--font, system-ui, -apple-system, "Segoe UI", sans-serif);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65);
}

.halex-m-ai-panel[hidden] {
  display: none;
}

.halex-m-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d4af37;
  margin-bottom: 8px;
}

.halex-m-ai-close {
  background: transparent;
  border: 1px solid var(--border, #333333);
  border-radius: 8px;
  color: var(--text, #f3f3f3);
  cursor: pointer;
  padding: 2px 8px;
}

.halex-m-ai-status {
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 10px;
  padding: 8px 10px;
  color: #2dd4bf;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 10px;
  background: var(--panel-alt, #0d0d0d);
}

.halex-m-ai-output {
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--border, #333333);
  border-radius: 10px;
  padding: 10px;
  min-height: 96px;
  font-size: 0.9rem;
  line-height: 1.45;
  background: var(--panel-alt, #0d0d0d);
  color: var(--text, #f3f3f3);
  margin-bottom: 10px;
}

.halex-m-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.halex-m-ai-actions button {
  flex: 1 1 auto;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d4af37;
  background: transparent;
  color: #d4af37;
  cursor: pointer;
  font-size: 0.82rem;
}

.halex-m-ai-actions button:hover,
.halex-m-ai-actions button:focus {
  border-color: #2dd4bf;
  color: #2dd4bf;
  outline: none;
}

.halex-m-ai-form {
  display: flex;
  gap: 8px;
}

.halex-m-ai-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border, #333333);
  background: var(--input, #0d0d0d);
  color: var(--text, #f3f3f3);
}

.halex-m-ai-form button {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #2dd4bf;
  background: transparent;
  color: #2dd4bf;
  cursor: pointer;
  font-weight: 600;
}

.halex-m-ai-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--muted, #a8a8a8);
}
