/* Akoti Markdown — Rendered content styles
   Works inside any chat bubble or content container. */

/* ═══════════ CODE BLOCKS ═══════════ */
.akm-code-block {
  position: relative;
  margin: 0.6rem 0;
  border-radius: 12px 4px 12px 4px;
  overflow: hidden;
  background: #1e1e24;
}

.akm-code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  background: none;
  border-radius: 0;
}

.akm-code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #d0e4f5;
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: pre;
  display: block;
}

.akm-lang {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 10px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(168,200,232,0.5);
  background: rgba(255,255,255,0.04);
  border-radius: 0 0 8px 0;
}

.akm-copy {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px 3px 8px 3px;
  color: rgba(168,200,232,0.5);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.akm-copy:hover {
  background: rgba(168,200,232,0.15);
  color: #a8c8e8;
  border-radius: 3px 8px 3px 8px;
}

.akm-copy.akm-copied {
  background: rgba(45,106,79,0.2);
  color: #6BCB77;
  border-color: rgba(45,106,79,0.3);
}

/* ═══════════ INLINE CODE ═══════════ */
.akm-code-block + p,
.akm-code-block + ul,
.akm-code-block + ol {
  margin-top: 0.5rem;
}

/* ═══════════ HEADINGS IN CHAT ═══════════ */
.akf-bubble h1,
.akf-bubble h2,
.akf-bubble h3,
.akf-bubble h4,
.akoti-chat-bubble h1,
.akoti-chat-bubble h2,
.akoti-chat-bubble h3,
.akoti-chat-bubble h4,
.aks-bubble h1,
.aks-bubble h2,
.aks-bubble h3,
.aks-bubble h4 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  margin: 0.6rem 0 0.3rem;
  line-height: 1.3;
}

.akf-bubble h1, .akoti-chat-bubble h1, .aks-bubble h1 { font-size: 1.15rem; }
.akf-bubble h2, .akoti-chat-bubble h2, .aks-bubble h2 { font-size: 1.05rem; }
.akf-bubble h3, .akoti-chat-bubble h3, .aks-bubble h3 { font-size: 0.95rem; }
.akf-bubble h4, .akoti-chat-bubble h4, .aks-bubble h4 { font-size: 0.88rem; }

.akf-bubble h1:first-child,
.akoti-chat-bubble h1:first-child,
.aks-bubble h1:first-child,
.akf-bubble h2:first-child,
.akoti-chat-bubble h2:first-child,
.aks-bubble h2:first-child,
.akf-bubble h3:first-child,
.akoti-chat-bubble h3:first-child,
.aks-bubble h3:first-child { margin-top: 0; }

/* ═══════════ PARAGRAPHS ═══════════ */
.akf-bubble p,
.akoti-chat-bubble p,
.aks-bubble p {
  margin: 0 0 0.5rem;
  line-height: 1.6;
}
.akf-bubble p:last-child,
.akoti-chat-bubble p:last-child,
.aks-bubble p:last-child { margin-bottom: 0; }

/* ═══════════ LISTS ═══════════ */
.akf-bubble ul, .akf-bubble ol,
.akoti-chat-bubble ul, .akoti-chat-bubble ol,
.aks-bubble ul, .aks-bubble ol {
  margin: 0.4rem 0;
  padding-left: 1.4rem;
}

.akf-bubble li, .akoti-chat-bubble li, .aks-bubble li {
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

.akf-bubble ul li, .akoti-chat-bubble ul li, .aks-bubble ul li {
  list-style-type: disc;
}

.akf-bubble ol li, .akoti-chat-bubble ol li, .aks-bubble ol li {
  list-style-type: decimal;
}

/* ═══════════ BLOCKQUOTES ═══════════ */
.akf-bubble blockquote,
.akoti-chat-bubble blockquote,
.aks-bubble blockquote {
  margin: 0.5rem 0;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #a8c8e8;
  background: rgba(168,200,232,0.06);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4a4a56;
}

/* ═══════════ TABLES ═══════════ */
.akf-bubble table,
.akoti-chat-bubble table,
.aks-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.8rem;
}

.akf-bubble th, .akf-bubble td,
.akoti-chat-bubble th, .akoti-chat-bubble td,
.aks-bubble th, .aks-bubble td {
  padding: 0.4rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid rgba(26,47,94,0.06);
}

.akf-bubble th, .akoti-chat-bubble th, .aks-bubble th {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4a4a56;
}

/* ═══════════ HORIZONTAL RULES ═══════════ */
.akf-bubble hr, .akoti-chat-bubble hr, .aks-bubble hr {
  border: none;
  height: 1px;
  background: rgba(26,47,94,0.08);
  margin: 0.75rem 0;
}

/* ═══════════ LINKS ═══════════ */
.akf-bubble a, .akoti-chat-bubble a, .aks-bubble a {
  color: #2c4a8a;
  text-decoration: underline;
  text-decoration-color: rgba(44,74,138,0.3);
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.akf-bubble a:hover, .akoti-chat-bubble a:hover, .aks-bubble a:hover {
  color: #0f1b3d;
  text-decoration-color: rgba(15,27,61,0.4);
}

/* ═══════════ STRONG / EM ═══════════ */
.akf-bubble strong, .akoti-chat-bubble strong, .aks-bubble strong {
  font-weight: 700;
}

.akf-bubble em, .akoti-chat-bubble em, .aks-bubble em {
  font-style: italic;
}

/* ═══════════ DEL ═══════════ */
.akf-bubble del, .akoti-chat-bubble del, .aks-bubble del {
  text-decoration: line-through;
  opacity: 0.6;
}

/* ═══════════ INLINE CODE (in bubbles) ═══════════ */
.akf-bubble code,
.akoti-chat-bubble code,
.aks-bubble code {
  background: rgba(26,47,94,0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82em;
}

/* Don't re-style code inside code blocks */
.akm-code-block code {
  background: none;
  padding: 0;
  border-radius: 0;
}

/* ═══════════ MESSAGE ACTIONS ═══════════ */
.akm-actions {
  display: flex;
  gap: 4px;
  margin-top: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.akf-msg:hover .akm-actions,
.akoti-chat-msg:hover .akm-actions,
.aks-msg:hover .akm-actions {
  opacity: 1;
}

.akm-action-btn {
  padding: 3px 8px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  color: #8a8a96;
  background: none;
  border: 1px solid rgba(26,47,94,0.08);
  border-radius: 8px 3px 8px 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
}

.akm-action-btn:hover {
  background: rgba(168,200,232,0.1);
  color: #2c4a8a;
  border-radius: 3px 8px 3px 8px;
}

.akm-action-btn svg {
  width: 12px;
  height: 12px;
}
