.ssac-chat.rlc {
    --ssac-green: var(--rlc-accent);
    --ssac-green-dark: var(--rlc-accent-hover);
    --ssac-line: var(--rlc-line);
    border-radius: 20px;
}

.ssac-chat > .ssac-header {
    justify-content: space-between;
    background: linear-gradient(122deg, #123d36, #126354);
}
.ssac-chat:not(.is-human-open) .control-head-chat .rlc-visitor-logout { display: none; }

.ssac-modes { position: relative; }
.ssac-modes:not([open]) .ssac-mode-options { display: none; }
.ssac-mode-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ffffff50;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    list-style: none;
    font: 700 24px/1 system-ui, sans-serif;
}
.ssac-mode-toggle::-webkit-details-marker { display: none; }
.ssac-mode-toggle:hover, .ssac-modes[open] .ssac-mode-toggle { background: #ffffff24; }
.ssac-mode-options {
    position: absolute;
    inset-inline-end: 0;
    inset-block-start: calc(100% + 6px);
    z-index: 20;
    display: grid;
    gap: 4px;
    min-width: max-content;
    padding: 5px;
    border: 1px solid var(--rlc-line);
    border-radius: 12px;
    background: var(--rlc-paper);
    box-shadow: 0 8px 20px #153d3033;
}
.ssac-mode-options button { justify-content: flex-start; }
.ssac-mode-options button[aria-pressed="true"] { background: var(--rlc-mint); }
.ssac-chat.rlc .ssac-log {
    background-color: var(--rlc-floor);
    background-image: radial-gradient(circle, #97b6aa45 1px, transparent 1px);
    background-size: 20px 20px;
}
.ssac-chat.rlc .ssac-bubble { background: var(--rlc-paper); border-color: var(--rlc-line); border-radius: 14px; }
.ssac-chat.rlc .ssac-bubble.is-user { background: var(--rlc-mint); border-color: #c4e3d6; }
.ssac-chat .ssac-composer button { background: var(--rlc-accent); }
.ssac-chat .ssac-ai-view { height: auto; }
.ssac-chat .ssac-ai-view .ssac-log { margin-bottom: 0; }
.ssac-chat .ssac-ai-view .ssac-composer { position: static; flex-shrink: 0; }
.ssac-chat .ssac-guest { flex-shrink: 0; }

.ssac-chat .ssac-human-view {
    display: flex;
    flex: 1;
    min-height: 0;
    max-height: none;
    margin: 0;
}
.ssac-human-chat, .ssac-human-chat .rlc-widget {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 0;
}
.ssac-human-chat .rlc-panel { flex: 1; min-height: 360px; }
.ssac-human-view .rlc-panel { min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.ssac-human-view .rlc-scroll { min-height: 120px; }
.ssac-human-view .rlc-chat { min-height: 175px; }
.ssac-human-chat .rlc-banner h2 { font-size: 16px; }
.ssac-human-chat .rlc-compose { align-items: flex-end; }
.ssac-human-chat .rlc-compose textarea { flex: 1; }

.rlc-support > .ssac-chat { height: 100%; max-height: 100%; }
.rlc-support .ssac-ai-view, .rlc-support .ssac-log { min-height: 0; }
.rlc-support .ssac-log { max-height: none; }

.rlc-article-launch { padding: 8px 14px; border-block-end: 1px solid var(--rlc-line); }
.rlc .rlc-article-dialog {
    width: min(840px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    color: var(--rlc-ink);
    background: var(--rlc-paper);
    border: 1px solid var(--rlc-line);
    border-radius: 20px;
    box-shadow: 0 24px 80px #102f2a4d;
    overflow: auto;
}
.rlc-article-dialog::backdrop { background: #102f2aae; }
.rlc-article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px clamp(14px, 4vw, 26px);
    color: white;
    background: linear-gradient(122deg, #123d36, #126354);
}
.rlc-article-header h2 { font-size: clamp(17px, 3vw, 22px); font-weight: 700; }
.rlc-article-header button { font-size: 22px; }
.rlc-article-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 12px clamp(14px, 4vw, 26px);
    border-block-end: 1px solid var(--rlc-line);
    counter-reset: article-step;
}
.rlc-article-steps li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0;
    color: var(--rlc-muted);
    font-weight: 600;
    counter-increment: article-step;
}
.rlc-article-steps li::before {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: var(--rlc-floor);
    content: counter(article-step);
}
.rlc-article-steps [aria-current] { color: var(--rlc-accent); }
.rlc-article-steps [aria-current]::before { color: white; background: var(--rlc-accent); }
.rlc-article-steps .is-complete::before { color: var(--rlc-accent); background: var(--rlc-mint); }
.rlc-article-body { padding: clamp(14px, 4vw, 26px); }
.rlc-article-body > [role], .rlc-article-body section > * { margin-block-end: 14px; }
.rlc-article-body section > :last-child { margin-block-end: 0; }
.rlc-topic-title {
    padding: 12px 14px;
    border-inline-start: 4px solid var(--rlc-accent);
    background: var(--rlc-floor);
    font-size: 17px;
    font-weight: 650;
}
.rlc-editorial-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rlc-article-field { display: grid; min-width: 0; gap: 8px; font-weight: 600; }
.rlc-article-field select { width: 100%; max-width: none; }
.rlc-article-editor label { font-weight: 650; }
.rlc-article-editor .wp-editor-area { min-height: 220px; border-radius: 0; }
.rlc-article-details { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.rlc-thumbnail-preview { display: block; width: 100%; max-height: 170px; object-fit: contain; border-radius: 10px; background: var(--rlc-floor); }
.rlc-article-taxonomies { display: grid; gap: 12px; }
.rlc-article-taxonomies fieldset { margin: 0; padding: 10px; border: 1px solid var(--rlc-line); border-radius: 10px; }
.rlc-article-taxonomies legend { padding-inline: 5px; }
.rlc-term-controls { display: flex; align-items: center; gap: 8px; }
.rlc-term-list { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.rlc-term-list:empty { display: none; }
.rlc-term-list li { margin: 0; }
.rlc-term-list button { padding: 3px 8px; border: 1px solid var(--rlc-line); border-radius: 8px; color: var(--rlc-accent); background: var(--rlc-mint); }
@media (max-width: 580px) {
    .rlc-article-details { grid-template-columns: minmax(0, 1fr); }
    .rlc-article-steps li { align-content: start; font-size: 12px; }
}
