/*
 * chat-rounded.css — global rounded-corners layer.
 *
 * Applies to every interactive / card-shaped surface in chat so nothing
 * reads as a sharp-edged rectangle. Plays nicely with the ethos layer:
 * terminal-ptt keeps its tighter 4px corners via its own !important rules;
 * boomer gets 10px via its own rules; this file just establishes a sane
 * baseline for everything the ethos layer doesn't explicitly touch.
 *
 * Specificity is high enough (0,2,1) to win over single-class base rules
 * but deliberately does NOT use !important so ethos-specific overrides
 * (terminal-ptt's 4px, boomer's 10px, lux's 0 on message cards, vibes's
 * 22px) stay in control within their own data-chat-ethos scope.
 */

/* ── Rounded corner scale ─────────────────────────────────── */
:root {
  --rad-xs:  8px;   /* tiny pills, tags, badges */
  --rad-sm:  12px;  /* compact buttons, chips */
  --rad-md:  16px;  /* buttons, inputs */
  --rad-lg:  20px;  /* cards, tool call blocks */
  --rad-xl:  24px;  /* composer bubbles, drawers */
  --rad-2xl: 28px;  /* message bubbles, big panels */
  --rad-pill: 999px;
}

/* ── Buttons + interactive controls ──────────────────────────────── */
[data-theme][data-mode] .hdr-btn,
[data-theme][data-mode] .msg-act,
[data-theme][data-mode] .mib-btn,
[data-theme][data-mode] .op-mode-btn,
[data-theme][data-mode] .tc-btn,
[data-theme][data-mode] .tc-chip,
[data-theme][data-mode] .bank-tab,
[data-theme][data-mode] .ws-tab,
[data-theme][data-mode] .suggestion-chip,
[data-theme][data-mode] .sticky-btn,
[data-theme][data-mode] .lb-btn {
  border-radius: var(--rad-sm);
}

/* Bigger controls — input, send, FABs, plus-menu */
[data-theme][data-mode] .ch-input,
[data-theme][data-mode] .ch-input-wrap,
[data-theme][data-mode] .upload-btn,
[data-theme][data-mode] .voice-fab,
[data-theme][data-mode] .boomer-plus-btn {
  border-radius: var(--rad-md);
}

/* Send button: always pill */
[data-theme][data-mode] .ch-send {
  border-radius: var(--rad-pill);
}

/* ── Cards + panels ───────────────────────────────────── */
[data-theme][data-mode] .tc-card,
[data-theme][data-mode] .tc-strip,
[data-theme][data-mode] .suggestion-card,
[data-theme][data-mode] .embed-card,
[data-theme][data-mode] .pep-card-inline,
[data-theme][data-mode] .gene-card,
[data-theme][data-mode] .bank-file,
[data-theme][data-mode] .session-item,
[data-theme][data-mode] .msg-callout,
[data-theme][data-mode] .thinking {
  border-radius: var(--rad-lg);
}
/* Message bubbles go a notch larger */
[data-theme][data-mode] .msg {
  border-radius: var(--rad-2xl);
}

/* Code block + header */
[data-theme][data-mode] .code-block {
  border-radius: var(--rad-lg);
  overflow: hidden;  /* so the inner pre respects the radius */
}
[data-theme][data-mode] .code-header {
  border-radius: var(--rad-lg) var(--rad-lg) 0 0;
}
[data-theme][data-mode] .code-block pre {
  border-radius: 0 0 var(--rad-lg) var(--rad-lg);
}

/* ── Drawers, modals, overlays ──────────────────────────────── */
[data-theme][data-mode] .chat-main,
[data-theme][data-mode] .bank-panel,
[data-theme][data-mode] #ws-panel,
[data-theme][data-mode] .modal-box,
[data-theme][data-mode] .ctx-menu,
[data-theme][data-mode] #search-bar,
[data-theme][data-mode] #mobile-sess-pill,
[data-theme][data-mode] .new-msg-pill,
[data-theme][data-mode] #toast {
  border-radius: var(--rad-2xl);
}

/* Chat main panel: force full rounding (overrides inline 20px in chat.html) */
[data-theme][data-mode] .chat-main {
  border-radius: var(--rad-2xl) !important;
}
[data-theme][data-mode] .ch-header {
  border-radius: var(--rad-2xl) var(--rad-2xl) 0 0 !important;
}
[data-theme][data-mode] .ch-composer {
  border-radius: 0 0 var(--rad-2xl) var(--rad-2xl) !important;
}
[data-theme][data-mode] .ch-messages {
  border-radius: 0 !important;
}

/* Sessions drawer + dropdowns */
[data-theme][data-mode] .sessions-panel,
[data-theme][data-mode] #mob-dropdown,
[data-theme][data-mode] .desk-dd,
[data-theme][data-mode] .nav-group-dropdown,
[data-theme][data-mode] #boomer-menu {
  border-radius: var(--rad-lg);
}

/* ── Status badges + chips (keep tight) ──────────────────────────── */
[data-theme][data-mode] .role-badge,
[data-theme][data-mode] .act-badge,
[data-theme][data-mode] .ctx-badge,
[data-theme][data-mode] .sess-tag,
[data-theme][data-mode] .pep-category,
[data-theme][data-mode] .pep-effect {
  border-radius: var(--rad-xs);
}

/* ── Nav inbox button: rounded soft square ───────────────────────── */
#hypatia-inbox-fab {
  border-radius: var(--rad-md) !important;
}

/* ── File + image thumbnails ─────────────────────────────────────── */
[data-theme][data-mode] .msg-img-thumb,
[data-theme][data-mode] img[class*=thumb] {
  border-radius: var(--rad-sm);
}

/* ── Composer wrap: match input radius to avoid double-edges ────── */
[data-theme][data-mode] .ch-composer {
  border-radius: 0 0 var(--rad-xl) var(--rad-xl);
}

/* ── Prevent sharp corners on theme-aware overrides that default to 0 ── */
[data-theme][data-mode] button,
[data-theme][data-mode] input:not([type="checkbox"]):not([type="radio"]),
[data-theme][data-mode] select,
[data-theme][data-mode] textarea {
  border-radius: var(--rad-sm);
}
[data-theme][data-mode] input[type="checkbox"],
[data-theme][data-mode] input[type="radio"] {
  /* keep browser-native shape */
}

/* ── Chat page body base: kill the sharp 20px-only top-only edges ── */
[data-theme][data-mode] .ch-header {
  border-radius: var(--rad-xl) var(--rad-xl) 0 0;
}

/* ── Reduce-motion: no change needed (corners don't animate) ─────── */
