/* win2linux Support Bot — Tux-themed chat assistant.
   Matches the course design language: dark canvas, cyan accent, glass surfaces. */

:root {
  --w2l-bot-bg: #0a0a10;
  --w2l-bot-surface: rgba(20, 22, 30, 0.88);
  --w2l-bot-surface-2: rgba(255, 255, 255, 0.026);
  --w2l-bot-border: rgba(255, 255, 255, 0.075);
  --w2l-bot-border-strong: rgba(0, 196, 196, 0.5);
  --w2l-bot-accent: #00c4c4;
  --w2l-bot-accent-2: #00e6e6;
  --w2l-bot-warm: #c4a030;
  --w2l-bot-text: #eef2f7;
  --w2l-bot-text-2: #879eb7;
  --w2l-bot-text-3: #66738a;
  --w2l-bot-green: #1ab86a;
  --w2l-bot-red: #e03e3e;
  --w2l-bot-shadow: 0 16px 48px rgba(0, 196, 196, 0.18), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ════════════════════════════════════════════════════════════════════
   Floating Tux launcher
   ════════════════════════════════════════════════════════════════════ */

#w2l-bot-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid var(--w2l-bot-border-strong);
  background: radial-gradient(circle at 35% 30%, #1a2030 0%, #0a0d12 100%);
  cursor: pointer;
  z-index: 999998;
  box-shadow: var(--w2l-bot-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease;
  overflow: visible;
}
#w2l-bot-launcher::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--w2l-bot-accent), transparent 60%);
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: -1;
  filter: blur(8px);
}
#w2l-bot-launcher:hover {
  transform: translateY(-2px) scale(1.04);
}
#w2l-bot-launcher:hover::before {
  opacity: 0.6;
}
#w2l-bot-launcher svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 8px rgba(0, 196, 196, 0.4));
}
#w2l-bot-launcher .w2l-bot-pulse {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--w2l-bot-green);
  border: 2px solid var(--w2l-bot-bg);
  box-shadow: 0 0 8px rgba(26, 184, 106, 0.7);
}
#w2l-bot-launcher .w2l-bot-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--w2l-bot-surface);
  border: 1px solid var(--w2l-bot-border);
  color: var(--w2l-bot-text);
  font: 500 12px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Manrope, sans-serif;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  backdrop-filter: blur(8px);
}
#w2l-bot-launcher:hover .w2l-bot-tooltip {
  opacity: 1;
}

/* ════════════════════════════════════════════════════════════════════
   Chat panel
   ════════════════════════════════════════════════════════════════════ */

#w2l-bot-panel {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100vh - 140px);
  background: var(--w2l-bot-surface);
  backdrop-filter: blur(24px);
  border: 1px solid var(--w2l-bot-border);
  border-radius: 16px;
  box-shadow: var(--w2l-bot-shadow);
  display: flex;
  flex-direction: column;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Manrope, system-ui, sans-serif;
  color: var(--w2l-bot-text);
  transform: translateY(8px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 220ms ease;
}
#w2l-bot-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

#w2l-bot-panel .w2l-bot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--w2l-bot-border);
}
#w2l-bot-panel .w2l-bot-header svg {
  width: 26px; height: 26px;
}
#w2l-bot-panel .w2l-bot-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--w2l-bot-text);
}
#w2l-bot-panel .w2l-bot-header .w2l-bot-sub {
  font-size: 11px;
  color: var(--w2l-bot-text-3);
  margin-top: 1px;
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  letter-spacing: 0.04em;
}
#w2l-bot-panel .w2l-bot-header .w2l-bot-info {
  flex: 1;
}
#w2l-bot-panel .w2l-bot-header .w2l-bot-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--w2l-bot-text-2);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, color 150ms ease;
  font-size: 16px;
}
#w2l-bot-panel .w2l-bot-header .w2l-bot-icon-btn:hover {
  background: var(--w2l-bot-surface-2);
  color: var(--w2l-bot-text);
}

/* Messages area */
#w2l-bot-panel .w2l-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
#w2l-bot-panel .w2l-bot-messages::-webkit-scrollbar {
  width: 6px;
}
#w2l-bot-panel .w2l-bot-messages::-webkit-scrollbar-track {
  background: transparent;
}
#w2l-bot-panel .w2l-bot-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 196, 196, 0.2);
  border-radius: 3px;
}

.w2l-bot-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  line-height: 1.55;
  animation: w2l-bot-slide-in 240ms cubic-bezier(.2,.8,.2,1);
}
@keyframes w2l-bot-slide-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.w2l-bot-msg.user {
  align-self: flex-end;
  max-width: 85%;
}
.w2l-bot-msg.bot {
  align-self: flex-start;
  max-width: 100%;
}
.w2l-bot-msg .bubble {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--w2l-bot-border);
}
.w2l-bot-msg.user .bubble {
  background: rgba(0, 196, 196, 0.12);
  border-color: rgba(0, 196, 196, 0.3);
  color: var(--w2l-bot-text);
}
.w2l-bot-msg.bot .bubble {
  background: var(--w2l-bot-surface-2);
  border-color: var(--w2l-bot-border);
  color: var(--w2l-bot-text);
}
.w2l-bot-msg .bubble p {
  margin: 0 0 8px 0;
}
.w2l-bot-msg .bubble p:last-child {
  margin-bottom: 0;
}
.w2l-bot-msg .bubble strong {
  color: var(--w2l-bot-accent);
  font-weight: 700;
}
.w2l-bot-msg .bubble code {
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  font-size: 12.5px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--w2l-bot-border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--w2l-bot-accent-2);
}
.w2l-bot-msg .bubble pre {
  background: #090d14;
  border: 1px solid var(--w2l-bot-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--w2l-bot-accent-2);
}
.w2l-bot-msg .bubble pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.w2l-bot-msg .bubble ul, .w2l-bot-msg .bubble ol {
  margin: 6px 0 8px 0;
  padding-left: 22px;
}
.w2l-bot-msg .bubble li {
  margin: 4px 0;
}
.w2l-bot-msg .bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 12.5px;
}
.w2l-bot-msg .bubble th, .w2l-bot-msg .bubble td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--w2l-bot-border);
}
.w2l-bot-msg .bubble th {
  color: var(--w2l-bot-text-2);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.w2l-bot-msg .meta {
  font-size: 10.5px;
  color: var(--w2l-bot-text-3);
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  letter-spacing: 0.04em;
  padding: 0 4px;
}

.w2l-bot-msg .refs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding: 0 4px;
}
.w2l-bot-msg .ref-chip {
  background: rgba(0, 196, 196, 0.1);
  border: 1px solid rgba(0, 196, 196, 0.3);
  color: var(--w2l-bot-accent);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease;
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
}
.w2l-bot-msg .ref-chip:hover {
  background: rgba(0, 196, 196, 0.2);
}

.w2l-bot-thinking {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--w2l-bot-surface-2);
  border: 1px solid var(--w2l-bot-border);
  border-radius: 14px;
}
.w2l-bot-thinking span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--w2l-bot-accent);
  animation: w2l-bot-blink 1.2s infinite;
}
.w2l-bot-thinking span:nth-child(2) { animation-delay: 0.2s; }
.w2l-bot-thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes w2l-bot-blink {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* Input area */
#w2l-bot-panel .w2l-bot-input-area {
  border-top: 1px solid var(--w2l-bot-border);
  padding: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
#w2l-bot-panel textarea {
  flex: 1;
  background: var(--w2l-bot-surface-2);
  border: 1px solid var(--w2l-bot-border);
  color: var(--w2l-bot-text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 10px;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  outline: none;
  transition: border-color 150ms ease;
}
#w2l-bot-panel textarea:focus {
  border-color: var(--w2l-bot-accent);
}
#w2l-bot-panel textarea::placeholder {
  color: var(--w2l-bot-text-3);
}
#w2l-bot-panel .w2l-bot-send {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: var(--w2l-bot-accent);
  color: #001517;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, transform 100ms ease;
}
#w2l-bot-panel .w2l-bot-send:hover {
  background: var(--w2l-bot-accent-2);
}
#w2l-bot-panel .w2l-bot-send:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--w2l-bot-text-3);
  cursor: not-allowed;
}

/* Suggested prompts (welcome screen) */
.w2l-bot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.w2l-bot-suggestions button {
  background: var(--w2l-bot-surface-2);
  border: 1px solid var(--w2l-bot-border);
  color: var(--w2l-bot-text-2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms ease;
}
.w2l-bot-suggestions button:hover {
  border-color: var(--w2l-bot-accent);
  color: var(--w2l-bot-accent);
  background: rgba(0, 196, 196, 0.06);
}

/* Settings drawer */
.w2l-bot-settings {
  display: none;
  padding: 14px 16px;
  border-bottom: 1px solid var(--w2l-bot-border);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12.5px;
}
.w2l-bot-settings.open {
  display: block;
}
.w2l-bot-settings h4 {
  margin: 0 0 8px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--w2l-bot-text-3);
}
.w2l-bot-settings p {
  font-size: 12px;
  color: var(--w2l-bot-text-2);
  margin: 0 0 10px 0;
  line-height: 1.5;
}
.w2l-bot-settings .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.w2l-bot-settings label {
  font-size: 11px;
  color: var(--w2l-bot-text-3);
  letter-spacing: 0.04em;
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
}
.w2l-bot-settings input, .w2l-bot-settings select {
  background: var(--w2l-bot-surface-2);
  border: 1px solid var(--w2l-bot-border);
  color: var(--w2l-bot-text);
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 6px;
  outline: none;
}
.w2l-bot-settings input:focus, .w2l-bot-settings select:focus {
  border-color: var(--w2l-bot-accent);
}
.w2l-bot-settings .actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.w2l-bot-settings .actions button {
  background: var(--w2l-bot-accent);
  color: #001517;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 11.5px;
}
.w2l-bot-settings .actions button.secondary {
  background: transparent;
  border: 1px solid var(--w2l-bot-border);
  color: var(--w2l-bot-text-2);
}

@media (max-width: 480px) {
  #w2l-bot-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 100px);
    bottom: 88px;
    right: 8px;
  }
  #w2l-bot-launcher {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
}
