/* ============================================================
   Brevity KB Chat — Frontend Styles
   ============================================================
   Design tokens: override any --bkbc-* variable in your theme
   to customise colours without touching this file.
   To disable all plugin styles, enable "Disable Plugin Styles"
   in KB Chat → Settings and write your own CSS.
   ============================================================ */


/* ── Design tokens ───────────────────────────────────────────────────────── */

:root {
    /* Brand */
    --bkbc-primary:        #1a56db;
    --bkbc-primary-dark:   #1545b8;

    /* Surfaces */
    --bkbc-surface:        #ffffff;
    --bkbc-bg:             #f9fafb;

    /* Borders */
    --bkbc-border:         #e5e7eb;
    --bkbc-border-focus:   #cbd5e1;

    /* Text */
    --bkbc-text:           inherit;
    --bkbc-text-muted:     #6b7280;
    --bkbc-placeholder:    #9ca3af;

    /* Bubbles */
    --bkbc-bubble-user:    #1a56db;
    --bkbc-bubble-ai:      #f3f4f6;

    /* Shape */
    --bkbc-radius:         16px;
    --bkbc-radius-sm:      8px;

    /* Elevation */
    --bkbc-shadow:         0 8px 30px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
    --bkbc-shadow-sm:      0 1px 4px rgba(0,0,0,.06);

    /* Z-index */
    --bkbc-z:              9999;
}


/* ── Keyframes ───────────────────────────────────────────────────────────── */

@keyframes bkbc-bounce {
    0%, 60%, 100% { transform: translateY(0);    opacity: .4; }
    30%            { transform: translateY(-5px); opacity: 1;  }
}
@keyframes bkbc-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0);    }
}
@keyframes bkbc-msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0);   }
}
@keyframes bkbc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes bkbc-cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.bkbc-fade-in { animation: bkbc-fade-in .3s ease-out; }


/* ── Shared: streaming cursor ────────────────────────────────────────────── */

/* Blinking block cursor shown inside streaming assistant bubbles. */
.bkbc-streaming::after {
    content: '\25AE';
    display: inline-block;
    margin-left: 2px;
    vertical-align: baseline;
    font-size: .85em;
    color: var(--bkbc-primary);
    animation: bkbc-cursor-blink .6s step-end infinite;
}


/* ── Shared: typing indicator dots ──────────────────────────────────────── */

/* Both .bkbc-typing (popup) and .bkbc-embed-typing (embed) use identical dots.
   Layout padding/margin is set per-widget in their own sections. */
.bkbc-typing span,
.bkbc-embed-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bkbc-text-muted);
    animation: bkbc-bounce .9s infinite;
}
.bkbc-typing span:nth-child(2),
.bkbc-embed-typing span:nth-child(2) { animation-delay: .15s; }
.bkbc-typing span:nth-child(3),
.bkbc-embed-typing span:nth-child(3) { animation-delay: .30s; }


/* ── Shared: send button base ────────────────────────────────────────────── */

/* Common colours and transitions for .bkbc-send-btn (popup) and
   .bkbc-embed-send-btn (embed). Size and shape are set per-widget. */
.bkbc-send-btn,
.bkbc-embed-send-btn {
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    background: var(--bkbc-primary);
    transition: background .15s, transform .1s;
}
.bkbc-send-btn:hover:not(:disabled),
.bkbc-embed-send-btn:hover:not(:disabled) { background: var(--bkbc-primary-dark); transform: scale(1.05); }
.bkbc-send-btn:disabled,
.bkbc-embed-send-btn:disabled             { background: var(--bkbc-border); color: var(--bkbc-text-muted); cursor: default; }


/* ── Shared: textarea base ───────────────────────────────────────────────── */

/* Common reset for .bkbc-textarea (popup) and .bkbc-embed-textarea (embed).
   Each widget then adds its own border, padding, and size overrides. */
.bkbc-textarea,
.bkbc-embed-textarea {
    border: none;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    line-height: 1.5;
    overflow-y: auto;
    width: 100%;
}
.bkbc-textarea::placeholder,
.bkbc-embed-textarea::placeholder { color: var(--bkbc-placeholder); }


/* ── Shared: mode toggle ─────────────────────────────────────────────────── */

/* Rendered inside the embed input wrap; shown/hidden by JS. */
.bkbc-mode-bar { display: flex; align-items: center; }
.bkbc-mode-select {
    padding: 4px 8px;
    font-size: .82em;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--bkbc-text-muted);
    appearance: auto;
    outline: none;
    transition: color .15s;
    font-family: inherit;
}
.bkbc-mode-select:hover,
.bkbc-mode-select:focus { color: inherit; }


/* ============================================================
   POPUP WIDGET  [brevity_chat] or [brevity_chat mode="popup"]
   ============================================================ */

#bkbc-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--bkbc-z);
}

/* Toggle button */
.bkbc-toggle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bkbc-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    transition: transform .2s, box-shadow .2s;
    position: relative;
    z-index: 1;
}
.bkbc-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* Panel */
.bkbc-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 32px);
    max-height: min(600px, calc(100vh - 110px));
    background: var(--bkbc-surface);
    border-radius: var(--bkbc-radius);
    box-shadow: var(--bkbc-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: bkbc-slide-up .2s ease-out;
}

/* Header */
.bkbc-header {
    background: var(--bkbc-primary);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.bkbc-header-info { display: flex; align-items: center; gap: 10px; }
.bkbc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bkbc-header-name   { font-weight: 600; }
.bkbc-header-status {
    font-size: .8em;
    opacity: .85;
    display: flex;
    align-items: center;
    gap: 5px;
}
.bkbc-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
}
.bkbc-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    opacity: .8;
    transition: opacity .15s;
}
.bkbc-close-btn:hover { opacity: 1; }

/* Intake screen */
.bkbc-intake {
    padding: 20px 18px;
    overflow-y: auto;
    flex: 1;
}
.bkbc-intake-intro {
    margin: 0 0 16px;
    color: var(--bkbc-text-muted);
    font-size: .9em;
}
.bkbc-label {
    display: block;
    font-weight: 600;
    font-size: .85em;
    margin-bottom: 4px;
}
.bkbc-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--bkbc-border);
    border-radius: var(--bkbc-radius-sm);
    font-size: .9em;
    margin-bottom: 12px;
    box-sizing: border-box;
    background: var(--bkbc-bg);
    font-family: inherit;
    color: inherit;
    outline: none;
    transition: border-color .15s;
}
.bkbc-input:focus {
    border-color: var(--bkbc-primary);
    background: var(--bkbc-surface);
}

/* Agent / topic grid */
.bkbc-agent-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.bkbc-agent-btn {
    padding: 10px 12px;
    border: 1.5px solid var(--bkbc-border);
    border-radius: var(--bkbc-radius-sm);
    background: var(--bkbc-bg);
    cursor: pointer;
    font-size: .85em;
    font-weight: 600;
    text-align: left;
    transition: border-color .15s, color .15s;
    color: inherit;
    font-family: inherit;
}
.bkbc-agent-btn small {
    display: block;
    font-weight: 400;
    color: var(--bkbc-text-muted);
    font-size: .85em;
    margin-top: 2px;
}
.bkbc-agent-btn:hover,
.bkbc-agent-btn.selected {
    border-color: var(--bkbc-primary);
    color: var(--bkbc-primary);
}

.bkbc-link-btn {
    background: none;
    border: none;
    color: var(--bkbc-primary);
    cursor: pointer;
    font-size: .85em;
    padding: 0;
    margin-bottom: 16px;
    display: block;
    text-decoration: underline;
    font-family: inherit;
}

/* Primary action button */
.bkbc-btn {
    display: block;
    width: 100%;
    padding: 11px 16px;
    border: none;
    border-radius: var(--bkbc-radius-sm);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.bkbc-btn-primary          { background: var(--bkbc-primary); color: #fff; }
.bkbc-btn-primary:hover    { background: var(--bkbc-primary-dark); }
.bkbc-btn-primary:disabled { opacity: .6; cursor: default; }

/* Message list */
.bkbc-chat {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.bkbc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}
.bkbc-messages::-webkit-scrollbar       { width: 4px; }
.bkbc-messages::-webkit-scrollbar-track { background: transparent; }
.bkbc-messages::-webkit-scrollbar-thumb { background: var(--bkbc-border); border-radius: 4px; }

.bkbc-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 100%;
}
.bkbc-msg-user { flex-direction: row-reverse; }

.bkbc-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bkbc-primary);
    color: #fff;
    font-size: .65em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.bkbc-bubble {
    padding: 10px 14px;
    border-radius: var(--bkbc-radius);
    max-width: 78%;
    font-size: .9em;
    line-height: 1.55;
    word-break: break-word;
}
.bkbc-msg-assistant .bkbc-bubble { background: var(--bkbc-bubble-ai); border-bottom-left-radius: 4px; }
.bkbc-msg-user      .bkbc-bubble { background: var(--bkbc-bubble-user); color: #fff; border-bottom-right-radius: 4px; }
.bkbc-msg-error     .bkbc-bubble { background: #fee2e2; color: #991b1b; }

/* Typing indicator */
.bkbc-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 16px 10px 50px;
    flex-shrink: 0;
}

/* Input area */
.bkbc-input-area {
    border-top: 1px solid var(--bkbc-border);
    padding: 10px 12px;
    background: var(--bkbc-surface);
    flex-shrink: 0;
}
.bkbc-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

/* Popup textarea — adds border, padding, bg on top of the shared base */
.bkbc-textarea {
    flex: 1;
    border: 1.5px solid var(--bkbc-border);
    border-radius: 12px;
    padding: 9px 12px;
    font-size: .9em;
    max-height: 120px;
    background: var(--bkbc-bg);
    transition: border-color .15s;
}
.bkbc-textarea:focus { border-color: var(--bkbc-primary); background: var(--bkbc-surface); }

/* Popup send button — circle shape */
.bkbc-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.bkbc-footer-note {
    font-size: .72em;
    color: var(--bkbc-text-muted);
    text-align: center;
    margin-top: 6px;
}

@media (max-width: 480px) {
    #bkbc-chat-widget { bottom: 16px; right: 16px; }
    .bkbc-panel       { width: calc(100vw - 32px); bottom: 66px; border-radius: 14px; }
}


/* ============================================================
   EMBED WIDGET  [brevity_chat mode="embed"]
   ============================================================ */

.bkbc-embed {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Message list */
.bkbc-embed-messages {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-bottom: 24px;
}
.bkbc-embed-message {
    display: flex;
    flex-direction: column;
    animation: bkbc-msg-in .2s ease-out;
}

/* User bubble */
.bkbc-embed-msg-user { align-items: flex-end; }
.bkbc-embed-msg-user .bkbc-embed-bubble {
    background: var(--bkbc-bubble-ai);
    padding: 14px 20px;
    border-radius: 20px;
    max-width: 75%;
    line-height: 1.55;
    word-break: break-word;
}

/* Assistant bubble — no background, full-width prose style */
.bkbc-embed-msg-assistant { align-items: flex-start; }
.bkbc-embed-msg-assistant .bkbc-embed-bubble {
    background: none;
    padding: 0;
    line-height: 1.7;
    max-width: 100%;
    word-break: break-word;
}
.bkbc-embed-msg-assistant .bkbc-embed-bubble strong { font-weight: 700; }
.bkbc-embed-msg-assistant .bkbc-embed-bubble ul,
.bkbc-embed-msg-assistant .bkbc-embed-bubble ol     { margin: 8px 0 8px 20px; padding: 0; }
.bkbc-embed-msg-assistant .bkbc-embed-bubble li     { margin-bottom: 4px; }

.bkbc-embed-msg-error .bkbc-embed-bubble { color: #991b1b; font-style: italic; }

/* Typing indicator */
.bkbc-embed-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 24px;
    padding-left: 2px;
}

/* Input box */
.bkbc-embed--pre-chat .bkbc-embed-textarea { min-height: 80px; }

.bkbc-embed-input-wrap {
    display: flex;
    flex-direction: column;
    background: var(--bkbc-surface);
    border: 1.5px solid var(--bkbc-border);
    border-radius: 18px;
    padding: 16px 16px 12px 22px;
    box-shadow: var(--bkbc-shadow-sm);
    transition: border-color .15s, box-shadow .15s;
}
.bkbc-embed-input-wrap:focus-within {
    border-color: var(--bkbc-border-focus);
    box-shadow: 0 2px 10px rgba(0,0,0,.09);
}

/* Embed textarea — borderless inside the card, on top of the shared base */
.bkbc-embed-textarea {
    background: none;
    max-height: 160px;
    font-size: 1em;
}

/* Footer row — mode bar (left) and send button (right) */
.bkbc-embed-footer-row {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

/* Embed send button — rounded square shape */
.bkbc-embed-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    margin-left: auto;
}

/* Agent chips */
.bkbc-embed-agents {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    justify-content: center;
}
.bkbc-embed-agent-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}
.bkbc-embed-agent-icon--svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.bkbc-embed-agent-icon--svg svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}
.bkbc-embed-agent-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border: 1.5px solid var(--bkbc-border);
    border-radius: 100px;
    background: var(--bkbc-surface);
    font-size: .88em;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-family: inherit;
    color: inherit;
}
.bkbc-embed-agent-btn:hover,
.bkbc-embed-agent-btn.active {
    border-color: var(--bkbc-text-muted);
    background: var(--bkbc-bg);
}
.bkbc-embed-agent-btn.active { font-weight: 600; }

/* Disclaimer */
.bkbc-embed-disclaimer {
    text-align: center;
    font-size: .82em;
    color: var(--bkbc-text-muted);
    margin-top: 16px;
    line-height: 1.5;
}
.bkbc-embed-disclaimer a       { color: var(--bkbc-text-muted); text-decoration: underline; }
.bkbc-embed-disclaimer a:hover { opacity: .7; }

@media (max-width: 600px) {
    .bkbc-embed-msg-user .bkbc-embed-bubble { max-width: 90%; }
    .bkbc-embed-agents                       { justify-content: flex-start; }
}

/* Markdown tables */
.bkbc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9em;
    margin: 8px 0;
    line-height: 1.4;
}
.bkbc-table th,
.bkbc-table td {
    padding: 6px 10px;
    border: 1px solid var(--bkbc-border, #e2e8f0);
    text-align: left;
    vertical-align: top;
}
.bkbc-table th {
    background: var(--bkbc-bg-secondary, #f8fafc);
    font-weight: 600;
}
.bkbc-table tr:nth-child(even) td {
    background: var(--bkbc-bg-secondary, #f8fafc);
}

/* Markdown headings in chat bubbles */
.bkbc-bubble .bkbc-h,
.bkbc-embed-bubble .bkbc-h {
    margin: 12px 0 4px;
    line-height: 1.3;
    font-weight: 700;
}
.bkbc-bubble .bkbc-h:first-child,
.bkbc-embed-bubble .bkbc-h:first-child { margin-top: 0; }
.bkbc-h2 { font-size: 1.05em; }
.bkbc-h3 { font-size: 1em;    }
.bkbc-h4 { font-size: .95em;  }
.bkbc-bubble p,
.bkbc-embed-bubble p { margin: 0 0 8px; }
.bkbc-bubble p:last-child,
.bkbc-embed-bubble p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   Cookie Consent Banner
   Structural layout only. The dark background is intentional — the banner must
   float above any theme and remain readable regardless of page color.
   ───────────────────────────────────────────────────────────────────────────── */

.bkbc-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #1e293b;  /* intentional: must contrast with any theme page */
    color: #f1f5f9;
    padding: 16px 20px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .18);
    animation: bkbc-banner-in .35s cubic-bezier(.22,.68,0,1.2) both;
}

.bkbc-cookie-banner.bkbc-cookie-banner--hiding {
    animation: bkbc-banner-out .3s ease-in forwards;
}

@keyframes bkbc-banner-in {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes bkbc-banner-out {
    from { transform: translateY(0);    opacity: 1; }
    to   { transform: translateY(100%); opacity: 0; }
}

.bkbc-cookie-banner__inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.bkbc-cookie-banner__text {
    flex: 1 1 auto;
    margin: 0;
    font-size: .9em;
    line-height: 1.55;
    color: #cbd5e1;  /* on dark bg — must stay light */
}

.bkbc-cookie-banner__text a      { color: #93c5fd; text-decoration: underline; }
.bkbc-cookie-policy-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
    line-height: inherit;
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.bkbc-cookie-policy-link:hover   { color: #bfdbfe; }

.bkbc-cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Shared button base ── */

.bkbc-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .45em 1.4em;
    border-radius: .375em;
    font-size: .9em;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s, opacity .15s;
    white-space: nowrap;
    border: 2px solid transparent;
    font-family: inherit;
}

/* Accept — uses theme primary colour token with fallback */
.bkbc-cookie-btn--accept {
    background: var(--bkbc-primary, #1a56db);
    color: #fff;
    border-color: var(--bkbc-primary, #1a56db);
}
.bkbc-cookie-btn--accept:hover {
    background: var(--bkbc-primary-dark, #1545b8);
    border-color: var(--bkbc-primary-dark, #1545b8);
}

/* Deny on dark banner background */
.bkbc-cookie-btn--deny {
    background: transparent;
    color: #cbd5e1;
    border-color: #475569;
}
.bkbc-cookie-btn--deny:hover {
    background: #334155;
    color: #f1f5f9;
    border-color: #64748b;
}

@media (max-width: 600px) {
    .bkbc-cookie-banner__inner   { flex-direction: column; align-items: flex-start; gap: 14px; }
    .bkbc-cookie-banner__actions { width: 100%; }
    .bkbc-cookie-btn             { flex: 1; justify-content: center; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Cookie Policy Modal
   Structural rules only. Color, typography, and spacing inside .bkbc-cookie-modal__body
   intentionally inherit from the theme — no hardcoded values.
   ───────────────────────────────────────────────────────────────────────────── */

.bkbc-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bkbc-cookie-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.bkbc-cookie-modal__box {
    position: relative;
    /* Uses theme bg if --bkbc-surface is set; falls back to page background color */
    background: var(--bkbc-surface, var(--color-bg, #fff));
    color: inherit;
    border-radius: .75em;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: bkbc-modal-in .25s cubic-bezier(.22,.68,0,1.2) both;
}

@keyframes bkbc-modal-in {
    from { transform: scale(.93) translateY(10px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.bkbc-cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2em 1.5em 1em;
    border-bottom: 1px solid var(--bkbc-border, rgba(0,0,0,.1));
    flex-shrink: 0;
}

.bkbc-cookie-modal__title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    color: inherit;
    line-height: 1.3;
}

.bkbc-cookie-modal__close {
    background: none;
    border: none;
    width: 2em;
    height: 2em;
    border-radius: .375em;
    cursor: pointer;
    font-size: 1.4em;
    line-height: 1;
    color: inherit;
    opacity: .45;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s, background .15s;
    flex-shrink: 0;
}
.bkbc-cookie-modal__close:hover { opacity: 1; background: rgba(0,0,0,.06); }

/* Body — no colors, no font-size, no font-family: inherits everything from theme */
.bkbc-cookie-modal__body {
    padding: 1.25em 1.5em 1.5em;
    overflow-y: auto;
    line-height: 1.65;
    -webkit-overflow-scrolling: touch;
}

/* Minimal spacing only — color and size all inherit */
.bkbc-cookie-modal__body h1,
.bkbc-cookie-modal__body h2,
.bkbc-cookie-modal__body h3,
.bkbc-cookie-modal__body h4    { margin: 1em 0 .35em; font-weight: 700; }
.bkbc-cookie-modal__body h1    { font-size: 1.2em; }
.bkbc-cookie-modal__body h2    { font-size: 1.05em; }
.bkbc-cookie-modal__body h3,
.bkbc-cookie-modal__body h4    { font-size: 1em; }
.bkbc-cookie-modal__body p     { margin: 0 0 .65em; }
.bkbc-cookie-modal__body p:last-child { margin-bottom: 0; }
.bkbc-cookie-modal__body ul,
.bkbc-cookie-modal__body ol    { padding-left: 1.4em; margin: 0 0 .65em; }
.bkbc-cookie-modal__body a     { text-decoration: underline; } /* color inherits from theme */
.bkbc-cookie-modal__body a:hover { opacity: .8; }

/* Tables — minimal, inherits theme colors where possible */
.bkbc-cookie-modal__body table {
    width: 100%;
    border-collapse: collapse;
    margin: .75em 0;
    font-size: .95em;
}
.bkbc-cookie-modal__body th,
.bkbc-cookie-modal__body td {
    padding: .5em .75em;
    border: 1px solid var(--bkbc-border, rgba(0,0,0,.12));
    text-align: left;
    vertical-align: top;
}
.bkbc-cookie-modal__body th {
    font-weight: 600;
    background: rgba(0,0,0,.04); /* slight tint — works on any background color */
}
.bkbc-cookie-modal__body tr:nth-child(even) td {
    background: rgba(0,0,0,.02);
}

@media (max-width: 480px) {
    .bkbc-cookie-modal__box    { max-height: 90vh; border-radius: .5em; }
}

/* ── Cookie modal footer (consent change controls) ── */

.bkbc-cookie-modal__footer {
    padding: 1em 1.5em 1.25em;
    border-top: 1px solid var(--bkbc-border, rgba(0,0,0,.1));
    background: rgba(0,0,0,.03); /* subtle tint that works on any background */
    border-radius: 0 0 .75em .75em;
    flex-shrink: 0;
}

.bkbc-cookie-modal__footer-label {
    margin: 0 0 .75em;
    font-size: .85em;
    opacity: .7;
    display: flex;
    align-items: center;
    gap: .5em;
    flex-wrap: wrap;
}

.bkbc-cookie-modal__footer-actions {
    display: flex;
    gap: .625em;
}

/* Deny button override inside modal — needs to be legible on a light background */
.bkbc-cookie-modal__footer .bkbc-cookie-btn--deny {
    color: inherit;
    border-color: rgba(0,0,0,.25);
    background: transparent;
}
.bkbc-cookie-modal__footer .bkbc-cookie-btn--deny:hover {
    background: rgba(0,0,0,.06);
    border-color: rgba(0,0,0,.4);
    color: inherit;
}

/* Consent status badge — uses semantic green/red with neutral fallback */
.bkbc-modal-consent-status {
    font-weight: 600;
    font-size: .8em;
    padding: .15em .55em;
    border-radius: 999px;
    background: rgba(0,0,0,.08);
}
.bkbc-modal-consent-status--accepted { background: #d1fae5; color: #065f46; }
.bkbc-modal-consent-status--denied   { background: #fee2e2; color: #991b1b; }

@media (max-width: 480px) {
    .bkbc-cookie-modal__footer          { border-radius: 0 0 .5em .5em; }
    .bkbc-cookie-modal__footer-actions  { flex-direction: column; }
    .bkbc-cookie-modal__footer-actions .bkbc-cookie-btn { width: 100%; justify-content: center; }
}
