/* Anyan neon-purple theme profile.
   This file is loaded after app.css and can be replaced per deployment. */
:root {
  color-scheme: dark;
  --bg:        #07020d;
  --panel:     #100719;
  --panel2:    #170b24;
  --panel3:    #211033;
  --text:      #f2e9ff;
  --text-dim:  #d7c3ef;
  --muted:     #9d83bd;
  --border:    #2d1844;
  --border-hi: #4a2772;
  --accent:    #a855f7;
  --accent-hi: #d8b4fe;
  --accent-dim:#7e22ce;
  --accent-rgb: 168, 85, 247;
  --accent-hi-rgb: 216, 180, 254;
  --accent-dim-rgb: 126, 34, 206;
  --button-bg: linear-gradient(160deg, #c084fc, #9333ea);
  --button-text: #13051f;

  --history-sidebar-bg: rgba(13, 5, 22, 0.90);
  --history-sidebar-border: rgba(99, 45, 145, 0.52);
  --history-sidebar-restore-bg: rgba(13, 5, 22, 0.94);

  --history-card-bg: rgba(14, 16, 27, 0.96);
  --history-card-bg-hover: linear-gradient(135deg, rgba(18, 21, 34, 0.98), rgba(24, 22, 38, 0.98));
  --history-card-bg-active: linear-gradient(135deg, rgba(18, 22, 36, 0.99), rgba(26, 24, 43, 0.99));
  --history-card-bg-active-hover: linear-gradient(135deg, rgba(22, 26, 42, 0.99), rgba(31, 28, 50, 0.99));
  --history-card-border: rgba(148, 163, 184, 0.13);
  --history-card-border-hover: rgba(216, 180, 254, 0.38);
  --history-card-border-active: rgba(216, 180, 254, 0.58);
  --history-card-border-active-hover: rgba(232, 213, 255, 0.76);
  --history-card-shadow: inset 0 0 0 1px rgba(255,255,255,0.016);
  --history-card-shadow-hover: 0 0 0 1px rgba(168, 85, 247, 0.06), inset 0 0 0 1px rgba(255,255,255,0.024);
  --history-card-shadow-active: 0 0 18px rgba(168, 85, 247, 0.06), inset 0 0 0 1px rgba(255,255,255,0.032);
  --history-card-text: #efe9f8;
  --history-card-text-active: #fff8ff;
  --history-card-muted: #b89fd9;

  --history-delete-bg: rgba(14, 16, 27, 0.92);
  --history-delete-bg-hover: rgba(239, 118, 118, 0.10);
  --history-delete-border: rgba(148, 163, 184, 0.10);
  --history-delete-border-hover: rgba(239, 118, 118, 0.44);
  --history-delete-color: #c7b4dc;
  --history-delete-color-hover: #ff9fba;

  --history-generating-bg: linear-gradient(135deg, rgba(15, 20, 34, 0.99), rgba(21, 20, 35, 0.99));
  --history-generating-border: rgba(216, 180, 254, 0.42);
  --history-generating-shadow: 0 0 0 1px rgba(168, 85, 247, 0.06), inset 0 0 0 1px rgba(255,255,255,0.026);
  --history-generation-badge-text: #fff8ff;

  --glow:      rgba(168, 85, 247, 0.22);
  --glow-sm:   rgba(168, 85, 247, 0.12);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 18% 0%, rgba(168, 85, 247, 0.18), transparent 34rem),
    radial-gradient(circle at 82% 18%, rgba(126, 34, 206, 0.16), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(88, 28, 135, 0.11), transparent 32rem);
}

.brand-accent {
  color: #9333ea;
  text-shadow: 0 0 10px rgba(147, 51, 234, 0.32);
}

.topbar {
  border-bottom-color: var(--border);
  background: rgba(12, 5, 20, 0.88);
}

.topbar nav a:hover,
.topbar-control:hover:not(:disabled),
.topbar-toggle:hover,
button.secondary:hover:not(:disabled) {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.075);
  border-color: rgba(var(--accent-hi-rgb), 0.36);
  text-decoration: none;
}

.topbar-control.active {
  color: var(--text);
  border-color: rgba(var(--accent-hi-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.12);
}

/* History list styling is driven by the --history-* tokens above. */

.message.assistant {
  box-shadow: 0 0 0 1px rgba(var(--accent-hi-rgb), 0.05), var(--shadow);
}
.message.user {
  border-color: rgba(var(--accent-rgb), 0.20);
}
.message.pending,
.composer-card:focus-within,
.composer-card.upload-drop-active,
.files-upload-card.upload-drop-active {
  border-color: rgba(var(--accent-hi-rgb), 0.50);
  box-shadow: 0 0 0 3px var(--glow-sm), var(--shadow);
}
.composer-card.upload-drop-active::after,
.files-upload-card.upload-drop-active::after {
  border-color: rgba(var(--accent-hi-rgb), 0.72);
  background: rgba(12, 5, 20, 0.76);
}
.composer-attachment-chip,
.message-attachment-chip {
  border-color: rgba(var(--accent-hi-rgb), 0.26);
  background: rgba(var(--accent-rgb), 0.08);
}

/* Theme-controlled status art. The image replaces the default glowing dot. */
.service-status {
  width: 1.95rem;
  height: 1.95rem;
}
.status-indicator {
  position: relative;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 0;
  overflow: visible;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  transition: none;
}
.status-indicator::after {
  content: "";
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}
.status-indicator.online::after { background-image: url('/theme/assets/status-icons/cat-green.jpg'); }
.status-indicator.offline::after { background-image: url('/theme/assets/status-icons/cat-offline.jpg'); }
.status-indicator.unknown::after { background-image: url('/theme/assets/status-icons/cat-yellow.jpg'); }
.status-indicator.warning::after { background-image: url('/theme/assets/status-icons/cat-orange.jpg'); }
.status-indicator.busy::after { background-image: url('/theme/assets/status-icons/cat-red.jpg'); }

/* Keep the primary chat action green even in the purple Anyan theme. */
.send-actions .send-primary {
  background: linear-gradient(160deg, #54e68a, #2fca68);
  color: #041507;
  border-color: #1d8545;
  box-shadow: 0 1px 6px rgba(47, 202, 104, 0.22), inset 0 1px 0 rgba(255,255,255,0.08);
}
.send-actions .send-primary:hover:not(:disabled) {
  box-shadow: 0 2px 12px rgba(47, 202, 104, 0.34), inset 0 1px 0 rgba(255,255,255,0.08);
}
