/*
 * sibea drawer widget (v2). One component file: trigger button, slide-over
 * drawer, messages, answer table and caption, chips, history and usage
 * panels, feedback, mode toggle, composer. Theme tokens default to neutral;
 * a host overrides them through Sibea.mount({ theme }), which sets the same
 * custom properties on :root. Every token is used with a literal fallback.
 * Type inside the drawer is 1.2x the dashboard's base sizes.
 */

:root {
    --sibea-primary: #4A6FA5;
    --sibea-accent: #5B8DBE;
    --sibea-text: #1f2a37;
    --sibea-muted: #6b7280;
    --sibea-border: #e5e7eb;
    --sibea-bg: #ffffff;
    --sibea-canvas: #f7f7f8;
    --sibea-tint: #eef3f9;
    --sibea-warn: #c98a00;
    --sibea-danger: #e05c5c;
    --sibea-good: #1E8E3E;
    --sibea-font: 'Red Hat Display', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --sibea-mono: 'Courier New', monospace;
    --sibea-radius: 10px;
    --sibea-width: 630px;
    --sibea-z: 10500;
}

/* ---------- trigger ---------- */

.sibea-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem 0.4rem 0.5rem;
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 8px;
    background: var(--sibea-bg, #ffffff);
    color: var(--sibea-text, #1f2a37);
    font-family: var(--sibea-font, sans-serif);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sibea-trigger:hover,
.sibea-trigger:focus-visible {
    border-color: var(--sibea-primary, #4A6FA5);
    background: var(--sibea-tint, #eef3f9);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.15);
}

/* The logo is square (the Semantic mark); a small radius softens its corners. The SVG
   logo lights its own tiles in turn; the classes below add a soft halo of light around it.
   Nothing scales or moves: the logo keeps its exact size. */
.sibea-logo {
    width: 24px;
    height: 24px;
    border-radius: var(--sibea-logo-radius, 4px);
    object-fit: contain;
    flex: 0 0 auto;
}

/* Trigger: a soft halo glows up and fades, like a slow pulse of light. */
.sibea-logo--throb {
    animation: sibea-glow 2.8s ease-in-out infinite;
}

/* Drawer open: the trigger rests; the header logo glows instead. */
.sibea-trigger--open .sibea-logo--throb {
    animation: none;
}

.sibea-drawer__header .sibea-logo {
    animation: sibea-glow 3.6s ease-in-out infinite;
}

/* Thinking: the glow quickens. */
.sibea-trigger--busy .sibea-logo,
.sibea-drawer--busy .sibea-drawer__header .sibea-logo {
    animation: sibea-glow 1s ease-in-out infinite;
}

@keyframes sibea-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(15, 159, 196, 0); }
    50% { box-shadow: 0 0 8px 2px var(--sibea-pulse, rgba(15, 159, 196, 0.55)); }
}

@media (prefers-reduced-motion: reduce) {
    .sibea-logo--throb,
    .sibea-trigger--busy .sibea-logo,
    .sibea-drawer__header .sibea-logo,
    .sibea-drawer--busy .sibea-drawer__header .sibea-logo,
    .sibea-thinking__dot {
        animation: none;
    }
}

/* ---------- overlay + drawer ---------- */

.sibea-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: calc(var(--sibea-z, 10500) - 1);
}

.sibea-overlay--open {
    opacity: 1;
    visibility: visible;
}

.sibea-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: var(--sibea-width, 630px);
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    background: var(--sibea-bg, #ffffff);
    color: var(--sibea-text, #1f2a37);
    font-family: var(--sibea-font, sans-serif);
    font-size: 1.02rem;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: var(--sibea-z, 10500);
}

.sibea-drawer--open {
    transform: translateX(0);
}

@media (max-width: 767px) {
    .sibea-drawer {
        width: 100%;
    }
}

.sibea-drawer__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--sibea-border, #e5e7eb);
    background: var(--sibea-canvas, #f7f7f8);
}

.sibea-drawer__header .sibea-logo {
    width: 28px;
    height: 28px;
}

.sibea-drawer__title {
    font-weight: 700;
    font-size: 1.14rem;
    letter-spacing: 0.3px;
    color: var(--sibea-text, #1f2a37);
}

.sibea-drawer__spacer {
    flex: 1;
}

.sibea-drawer__footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 1rem;
    font-size: 0.78rem;
    color: var(--sibea-muted, #6b7280);
    border-top: 1px solid var(--sibea-border, #e5e7eb);
}

.sibea-drawer__footer-text {
    flex: 1;
    text-align: right;
}

.sibea-hidden {
    display: none !important;
}

/* ---------- buttons ---------- */

.sibea-btn {
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 6px;
    background: var(--sibea-bg, #ffffff);
    color: var(--sibea-text, #1f2a37);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sibea-btn:hover,
.sibea-btn:focus-visible,
.sibea-btn--active {
    border-color: var(--sibea-primary, #4A6FA5);
    background: var(--sibea-tint, #eef3f9);
    color: var(--sibea-primary, #4A6FA5);
    outline: none;
}

.sibea-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sibea-btn--primary {
    background: linear-gradient(135deg, var(--sibea-primary, #4A6FA5), var(--sibea-accent, #5B8DBE));
    color: #ffffff;
    border: none;
}

.sibea-btn--primary:hover,
.sibea-btn--primary:focus-visible {
    background: linear-gradient(135deg, var(--sibea-accent, #5B8DBE), var(--sibea-primary, #4A6FA5));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

.sibea-btn--icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.15rem;
    line-height: 1;
}

.sibea-btn--link {
    border: none;
    background: transparent;
    color: var(--sibea-primary, #4A6FA5);
    padding: 0.15rem 0.35rem;
}

.sibea-btn--link:hover,
.sibea-btn--link:focus-visible {
    background: transparent;
    text-decoration: underline;
}

/* ---------- usage meter ---------- */

.sibea-usage {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 110px;
}

.sibea-usage--visible {
    display: flex;
}

.sibea-usage__bar {
    width: 110px;
    height: 6px;
    border: none;
    border-radius: 3px;
    background: var(--sibea-border, #e5e7eb);
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
}

.sibea-usage__bar::-webkit-progress-bar {
    background: var(--sibea-border, #e5e7eb);
    border-radius: 3px;
}

.sibea-usage__bar::-webkit-progress-value {
    background: var(--sibea-primary, #4A6FA5);
    border-radius: 3px;
}

.sibea-usage__bar::-moz-progress-bar {
    background: var(--sibea-primary, #4A6FA5);
    border-radius: 3px;
}

.sibea-usage--warn .sibea-usage__bar::-webkit-progress-value,
.sibea-usage--warn .sibea-usage__bar::-moz-progress-bar {
    background: var(--sibea-warn, #c98a00);
}

.sibea-usage--stop .sibea-usage__bar::-webkit-progress-value,
.sibea-usage--stop .sibea-usage__bar::-moz-progress-bar {
    background: var(--sibea-danger, #e05c5c);
}

.sibea-usage__text {
    font-size: 0.74rem;
    color: var(--sibea-muted, #6b7280);
    white-space: nowrap;
}

.sibea-usage--warn .sibea-usage__text {
    color: var(--sibea-warn, #c98a00);
}

.sibea-usage--stop .sibea-usage__text {
    color: var(--sibea-danger, #e05c5c);
}

/* ---------- panels (history, admin) ---------- */

.sibea-history,
.sibea-admin,
.sibea-settings {
    max-height: 45%;
    overflow-y: auto;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--sibea-border, #e5e7eb);
    background: var(--sibea-bg, #ffffff);
    font-size: 0.9rem;
}

.sibea-panel__title,
.sibea-panel__subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--sibea-muted, #6b7280);
    margin: 0.5rem 0 0.35rem;
}

.sibea-panel__title {
    margin-top: 0;
}

.sibea-panel__empty {
    margin: 0;
    color: var(--sibea-muted, #6b7280);
}

.sibea-history__item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    margin-bottom: 0.25rem;
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 6px;
    background: var(--sibea-bg, #ffffff);
    color: var(--sibea-text, #1f2a37);
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sibea-history__item:hover,
.sibea-history__item:focus-visible {
    border-color: var(--sibea-primary, #4A6FA5);
    background: var(--sibea-tint, #eef3f9);
    outline: none;
}

.sibea-history__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sibea-history__date {
    flex: 0 0 auto;
    color: var(--sibea-muted, #6b7280);
    font-size: 0.8rem;
}

.sibea-admin__bar {
    width: 100%;
    margin-bottom: 0.4rem;
}

.sibea-admin__stat {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.2rem 0;
    border-bottom: 1px dashed var(--sibea-border, #e5e7eb);
}

.sibea-admin__stat-label {
    color: var(--sibea-muted, #6b7280);
}

.sibea-admin__stat-value {
    font-variant-numeric: tabular-nums;
}

.sibea-admin__table {
    font-size: 0.84rem;
    margin-bottom: 0.4rem;
}

/* ---------- messages ---------- */

.sibea-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background: var(--sibea-canvas, #f7f7f8);
}

.sibea-msg {
    max-width: 92%;
    border-radius: var(--sibea-radius, 10px);
    padding: 0.7rem 0.9rem;
    line-height: 1.45;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--sibea-border, #e5e7eb);
    background: var(--sibea-bg, #ffffff);
    overflow-wrap: anywhere;
}

.sibea-msg--user {
    align-self: flex-end;
    background: var(--sibea-primary, #4A6FA5);
    color: #ffffff;
    box-shadow: none;
}

.sibea-msg--assistant {
    align-self: stretch;
    max-width: 100%;
}

.sibea-msg--error {
    border-left: 3px solid var(--sibea-danger, #e05c5c);
}

.sibea-msg--limit {
    border-left: 3px solid var(--sibea-warn, #c98a00);
}

.sibea-msg--explore {
    border-left: 3px solid var(--sibea-warn, #c98a00);
}

.sibea-msg__text {
    margin: 0;
    white-space: pre-wrap;
}

.sibea-msg__headline {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

.sibea-msg__note {
    margin-top: 0.35rem;
    font-size: 0.76rem;
    color: var(--sibea-warn, #c98a00);
}

.sibea-badge {
    display: inline-block;
    margin-bottom: 0.4rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #fdf3dc;
    color: var(--sibea-warn, #c98a00);
    font-size: 0.74rem;
    font-weight: 600;
}

/* caption under every answer */

.sibea-caption {
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: var(--sibea-muted, #6b7280);
    line-height: 1.4;
}

.sibea-caption__line--muted {
    font-style: italic;
}

.sibea-caption__note {
    margin-top: 0.15rem;
    color: var(--sibea-text, #1f2a37);
}

.sibea-caption__note::before {
    content: '• ';
    color: var(--sibea-primary, #4A6FA5);
}

/* thinking indicator */

.sibea-thinking {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--sibea-muted, #6b7280);
    font-size: 0.9rem;
}

.sibea-thinking__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sibea-primary, #4A6FA5);
    animation: sibea-dot 1.2s ease-in-out infinite;
}

.sibea-thinking__dot:nth-child(2) { animation-delay: 0.2s; }
.sibea-thinking__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes sibea-dot {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- chips ---------- */

.sibea-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.sibea-chip {
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 999px;
    background: var(--sibea-bg, #ffffff);
    color: var(--sibea-primary, #4A6FA5);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.sibea-chip:hover,
.sibea-chip:focus-visible {
    background: var(--sibea-tint, #eef3f9);
    border-color: var(--sibea-primary, #4A6FA5);
    outline: none;
}

.sibea-suggested {
    align-self: stretch;
}

.sibea-suggested__title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--sibea-muted, #6b7280);
    margin-bottom: 0.35rem;
}

/* ---------- answer chart ---------- */

/* Fixed height so a chart never pushes the table out of view; the modal shows it large. */
.sibea-chart-block {
    margin: 0.5rem 0 0.75rem;
}

.sibea-chart {
    position: relative;
    height: var(--sibea-chart-height, 220px);
    padding: 0.4rem;
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 8px;
    background: var(--sibea-bg, #ffffff);
}

.sibea-chart canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Big, unmissable link to the large chart. */
.sibea-chart__open {
    display: block;
    width: 100%;
    min-height: 40px;
    margin-top: 0.5rem;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--sibea-primary, #4A6FA5);
    color: var(--sibea-on-primary, #ffffff);
    font-family: var(--sibea-font, sans-serif);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.sibea-chart__open:hover,
.sibea-chart__open:focus-visible {
    filter: brightness(1.08);
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 159, 196, 0.25);
}

.sibea-chart__note {
    margin-top: 0.3rem;
    color: var(--sibea-muted, #6b7280);
    font-size: 0.82rem;
}

/* sibea's own chart modal, used when the host has none. */
.sibea-chart-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--sibea-z, 10500) + 10);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 26, 64, 0.45);
}

.sibea-chart-modal__panel {
    display: flex;
    flex-direction: column;
    width: min(92vw, 1100px);
    height: min(80vh, 700px);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: var(--sibea-bg, #ffffff);
    box-shadow: 0 20px 60px rgba(10, 26, 64, 0.3);
}

.sibea-chart-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.sibea-chart-modal__title {
    color: var(--sibea-text, #1f2a37);
    font-family: var(--sibea-font, sans-serif);
    font-size: 1.1rem;
    font-weight: 700;
}

.sibea-chart-modal__body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

/* ---------- answer table ---------- */

.sibea-table-block {
    margin-top: 0.25rem;
}

.sibea-table__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sibea-text, #1f2a37);
    margin-bottom: 0.35rem;
}

.sibea-table-wrap {
    max-height: 480px;
    overflow: auto;
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 6px;
}

.sibea-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.sibea-table thead {
    background: var(--sibea-canvas, #f7f7f8);
    border-bottom: 2px solid var(--sibea-primary, #4A6FA5);
    position: sticky;
    top: 0;
}

.sibea-table th {
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    padding: 0.5rem 0.65rem;
    user-select: none;
    white-space: nowrap;
}

.sibea-table__th--sortable {
    cursor: pointer;
}

.sibea-table__th--sortable:hover {
    color: var(--sibea-primary, #4A6FA5);
}

.sibea-table th.sibea-table__th--asc::after {
    content: ' \25B2';
    font-size: 0.6rem;
}

.sibea-table th.sibea-table__th--desc::after {
    content: ' \25BC';
    font-size: 0.6rem;
}

.sibea-table td {
    padding: 0.45rem 0.65rem;
    border-bottom: 1px solid var(--sibea-border, #e5e7eb);
}

.sibea-table tbody tr:nth-child(even) {
    background: #fbfbfc;
}

.sibea-table tbody tr:hover {
    background: var(--sibea-tint, #eef3f9);
}

.sibea-table td:first-child {
    font-weight: 600;
}

.sibea-table .sibea-table__num,
.sibea-table th.sibea-table__num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sibea-table__totals td {
    font-weight: 700;
    border-top: 2px solid var(--sibea-border, #e5e7eb);
    border-bottom: none;
    background: var(--sibea-canvas, #f7f7f8);
}

/* measure / value layout for single results */
.sibea-table--single td:first-child {
    font-weight: 500;
    color: var(--sibea-muted, #6b7280);
    width: 50%;
}

.sibea-table--single td:last-child {
    font-weight: 700;
    color: var(--sibea-text, #1f2a37);
}

.sibea-table__actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--sibea-muted, #6b7280);
}

.sibea-table__count {
    white-space: nowrap;
}

.sibea-table__status {
    font-size: 0.74rem;
    color: var(--sibea-primary, #4A6FA5);
}

/* Months, reactor ids and codes in the first column do not wrap. */
.sibea-table--short-keys td:first-child,
.sibea-table--short-keys th:first-child {
    white-space: nowrap;
}

/* ---------- feedback ---------- */

/* model · cost · time under an answer, for the users the host switches it on for */
.sibea-details {
    margin-top: 0.4rem;
    color: var(--sibea-muted, #6b7280);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.sibea-feedback {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.sibea-feedback__btn {
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 999px;
    background: var(--sibea-bg, #ffffff);
    padding: 0.15rem 0.55rem;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.sibea-feedback__btn:hover,
.sibea-feedback__btn:focus-visible,
.sibea-feedback__btn--active {
    opacity: 1;
    border-color: var(--sibea-primary, #4A6FA5);
    background: var(--sibea-tint, #eef3f9);
    outline: none;
}

.sibea-feedback__form {
    display: flex;
    flex: 1;
    gap: 0.35rem;
    min-width: 220px;
}

.sibea-feedback__input {
    flex: 1;
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    font-family: inherit;
    font-size: 0.86rem;
}

.sibea-feedback__input:focus {
    border-color: var(--sibea-primary, #4A6FA5);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.15);
    outline: none;
}

.sibea-feedback__status {
    font-size: 0.74rem;
    color: var(--sibea-muted, #6b7280);
}

/* ---------- mode toggle ---------- */

.sibea-mode {
    display: inline-flex;
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 999px;
    overflow: hidden;
}

.sibea-mode__option {
    border: none;
    background: var(--sibea-bg, #ffffff);
    color: var(--sibea-muted, #6b7280);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
}

.sibea-mode__option--active {
    background: var(--sibea-primary, #4A6FA5);
    color: #ffffff;
}

/* ---------- settings ---------- */

.sibea-setting {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 0;
    cursor: pointer;
}

.sibea-setting__input {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    accent-color: var(--sibea-primary, #4A6FA5);
    cursor: pointer;
}

.sibea-setting__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sibea-setting__label {
    color: var(--sibea-text, #1f2a37);
    font-weight: 600;
}

.sibea-setting__hint {
    color: var(--sibea-muted, #6b7280);
    font-size: 0.82rem;
}

/* ---------- name suggestions ---------- */

.sibea-suggest {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: calc(100% - 0.4rem);
    z-index: 2;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 10px;
    background: var(--sibea-bg, #ffffff);
    box-shadow: 0 -6px 24px rgba(10, 26, 64, 0.12);
}

.sibea-suggest__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.8rem;
    color: var(--sibea-text, #1f2a37);
    font-size: 0.95rem;
    cursor: pointer;
}

.sibea-suggest__item:hover,
.sibea-suggest__item--active {
    background: var(--sibea-tint, #eef3f9);
}

.sibea-suggest__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sibea-suggest__type {
    flex: 0 0 auto;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: var(--sibea-canvas, #f7f7f8);
    color: var(--sibea-muted, #6b7280);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
}

.sibea-suggest__type--product { color: #0F7FA0; background: #E6F5FA; }
.sibea-suggest__type--rm { color: #7A4B00; background: #FFF3DF; }
.sibea-suggest__type--customer { color: #1F3D7C; background: #E9EEF8; }
.sibea-suggest__type--supplier { color: #2E7D32; background: #E8F5E9; }

/* ---------- composer ---------- */

.sibea-composer {
    /* relative: the name suggestions open just above it */
    position: relative;
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--sibea-border, #e5e7eb);
    background: var(--sibea-bg, #ffffff);
}

.sibea-composer__input {
    flex: 1;
    resize: none;
    min-height: 44px;
    border: 1px solid var(--sibea-border, #e5e7eb);
    border-radius: 6px;
    padding: 0.55rem 0.7rem;
    font-family: inherit;
    font-size: 0.98rem;
    line-height: 1.4;
    color: var(--sibea-text, #1f2a37);
    background: var(--sibea-canvas, #f7f7f8);
    transition: all 0.2s ease;
}

.sibea-composer__input:focus {
    border-color: var(--sibea-primary, #4A6FA5);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.15);
    outline: none;
}

.sibea-composer__input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sibea-composer__send {
    align-self: flex-end;
    padding: 0.6rem 1rem;
}
