/* ===== AI Chat — Parsesite (light product UI) ===== */

/* ВНИМАНИЕ: не используйте var(--x) в значениях свойств.
   Минификатор CssMin в EClientScript вырезает такие объявления целиком,
   и на проде цвета/фоны просто исчезают. Пишите значения явно. */
.ai-app .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ai-app {
    --ai-brand: #0693e8;
    --ai-brand-dark: #0477c2;
    --ai-brand-soft: rgba(6, 147, 232, 0.08);
    --ai-brand-mid: rgba(6, 147, 232, 0.16);
    --ai-danger: #e11d48;
    --ai-bg: #fafbfc;
    --ai-surface: #ffffff;
    --ai-sidebar-bg: #f4f6f8;
    --ai-border: #e6ebf0;
    --ai-border-strong: #d5dde6;
    --ai-text: #152433;
    --ai-muted: #6b7c8f;
    --ai-radius: 14px;
    --ai-shadow: 0 1px 2px rgba(15, 36, 64, 0.04), 0 8px 24px rgba(15, 36, 64, 0.06);
    color: #152433;
    margin: 0 -15px 40px;
}

@media (min-width: 1200px) {
    .ai-app {
        margin-left: calc(50% - 50vw + 15px);
        margin-right: calc(50% - 50vw + 15px);
        padding: 0 24px;
    }
}

.ai-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    height: calc(100vh - 140px);
    min-height: 560px;
    max-height: 860px;
    background: #ffffff;
    border: 1px solid #e6ebf0;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(15, 36, 64, 0.04), 0 8px 24px rgba(15, 36, 64, 0.06);
    overflow: hidden;
    position: relative;
}

/* ===== Sidebar (light) ===== */
.ai-sidebar {
    background: #f4f6f8;
    border-right: 1px solid #e6ebf0;
    color: #152433;
    display: flex;
    flex-direction: column;
    min-height: 0;
    z-index: 5;
}

.ai-sidebar-top {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-new-chat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: #0693e8;
    color: #fff !important;
    font-weight: 600;
    font-size: 13.5px;
    border: none;
    text-decoration: none !important;
    transition: background 0.15s, box-shadow 0.15s;
}

.ai-new-chat:hover {
    background: #0477c2;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(6, 147, 232, 0.35);
}

.ai-search-wrap {
    position: relative;
}

.ai-search-wrap i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7c8f;
    font-size: 12px;
    pointer-events: none;
}

.ai-search {
    width: 100%;
    background: #fff;
    border: 1px solid #e6ebf0;
    color: #152433;
    border-radius: 10px;
    padding: 8px 12px 8px 32px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ai-search::placeholder {
    color: #9aabbc;
}

.ai-search:focus {
    border-color: #0693e8;
    box-shadow: 0 0 0 3px rgba(6, 147, 232, 0.08);
}

.ai-chat-list {
    list-style: none;
    margin: 0;
    padding: 4px 10px 12px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.ai-chat-item {
    border-radius: 10px;
    margin-bottom: 2px;
    transition: background 0.12s;
}

.ai-chat-item:hover {
    background: rgba(6, 147, 232, 0.06);
}

.ai-chat-item.active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 36, 64, 0.06);
    border: 1px solid #e6ebf0;
}

.ai-chat-item a.chat-title {
    display: block;
    color: #152433 !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 550;
    line-height: 1.35;
    word-break: break-word;
}

.ai-chat-item-inner {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 9px 10px;
}

.ai-chat-meta {
    font-size: 11px;
    color: #6b7c8f;
    margin-top: 3px;
}

.ai-chat-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.12s;
    flex-shrink: 0;
}

.ai-chat-item:hover .ai-chat-actions,
.ai-chat-item.active .ai-chat-actions {
    opacity: 1;
}

.ai-icon-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #6b7c8f;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
    padding: 0;
}

.ai-icon-btn:hover {
    background: rgba(6, 147, 232, 0.08);
    color: #0693e8;
}

.ai-icon-btn.danger:hover {
    color: #e11d48;
    background: #fff1f2;
}

.ai-sidebar-empty {
    padding: 28px 14px;
    text-align: center;
    color: #6b7c8f;
    font-size: 12.5px;
    line-height: 1.45;
    list-style: none;
}

.ai-sidebar-foot {
    padding: 12px 14px;
    border-top: 1px solid #e6ebf0;
    font-size: 12px;
    color: #6b7c8f;
    background: transparent;
}

.ai-sidebar-foot a {
    color: #0693e8 !important;
    font-weight: 650;
    text-decoration: none !important;
}

.ai-sidebar-foot a:hover {
    text-decoration: underline !important;
}

/* ===== Main ===== */
.ai-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #fafbfc;
}

.ai-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 18px;
    background: #ffffff;
    border-bottom: 1px solid #e6ebf0;
    flex-shrink: 0;
}

.ai-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ai-menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid #e6ebf0;
    background: #fff;
    color: #152433;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.ai-chat-heading {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
    color: #152433;
}

.ai-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 9px;
    border: 1px solid #e6ebf0;
    background: #fff;
    font-size: 12.5px;
    font-weight: 550;
    color: #152433;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}

.ai-pill:hover {
    border-color: #0693e8;
    background: rgba(6, 147, 232, 0.08);
}

.ai-pill i {
    color: #0693e8;
    font-size: 12px;
}

.ai-limits-pill {
    text-decoration: none !important;
    color: #152433 !important;
    background: rgba(6, 147, 232, 0.08);
    border-color: transparent;
}

.ai-limits-pill.low {
    background: #fff7ed;
    color: #9a3412 !important;
}

.ai-limits-pill.empty {
    background: #fff1f2;
    color: #9f1239 !important;
}

.ai-limits-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ===== Messages ===== */
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    scroll-behavior: smooth;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ai-messages-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 20px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Empty state — vertically centered */
.ai-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 8px 32px;
    min-height: 100%;
    animation: aiFadeUp 0.4s ease;
}

.ai-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    border-radius: 16px;
    background: #0693e8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(6, 147, 232, 0.28);
}

.ai-empty-icon i {
    color: #fff !important;
}

.ai-empty h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #152433;
    letter-spacing: -0.02em;
}

.ai-empty > p {
    color: #6b7c8f;
    max-width: 380px;
    margin: 0 auto 28px;
    font-size: 14px;
    line-height: 1.5;
}

.ai-prompts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 560px;
}

.ai-prompt {
    background: #fff;
    border: 1px solid #e6ebf0;
    border-radius: 12px;
    padding: 14px 14px 14px 12px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    text-align: left;
    width: 100%;
    display: flex;
    gap: 11px;
    align-items: flex-start;
}

.ai-prompt:hover {
    border-color: #0693e8;
    background: #fff;
    box-shadow: 0 4px 16px rgba(6, 147, 232, 0.1);
}

.ai-prompt-ico {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(6, 147, 232, 0.08);
    color: #0693e8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.ai-prompt-text {
    min-width: 0;
}

.ai-prompt-title {
    display: block;
    font-weight: 650;
    font-size: 13px;
    margin-bottom: 2px;
    color: #152433;
}

.ai-prompt-desc {
    display: block;
    font-size: 12px;
    color: #6b7c8f;
    line-height: 1.35;
}

/* Messages */
.ai-chat .chat-msg {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    animation: aiFadeUp 0.25s ease;
}

.ai-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.chat-msg.user .ai-msg-avatar {
    background: #0693e8;
}

.chat-msg.assistant .ai-msg-avatar {
    background: #1e3348;
}

.ai-msg-body {
    flex: 1;
    min-width: 0;
}

.ai-msg-role {
    font-size: 11px;
    font-weight: 700;
    color: #6b7c8f;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ai-msg-bubble {
    background: #fff;
    border: 1px solid #e6ebf0;
    border-radius: 2px 14px 14px 14px;
    padding: 12px 14px;
    line-height: 1.6;
    font-size: 14.5px;
    word-wrap: break-word;
}

.chat-msg.user .ai-msg-bubble {
    background: rgba(6, 147, 232, 0.08);
    border-color: transparent;
    border-radius: 14px 2px 14px 14px;
}

.ai-msg-bubble .message-text > *:first-child { margin-top: 0; }
.ai-msg-bubble .message-text > *:last-child { margin-bottom: 0; }
.ai-msg-bubble .message-text p { margin-bottom: 0.7em; }

.ai-msg-bubble .message-text pre {
    margin: 0.7em 0;
    border-radius: 10px;
    overflow: hidden;
}

.ai-msg-bubble .message-text pre code {
    padding: 0.75em 1em;
    display: block;
    overflow-x: auto;
    font-size: 13px;
}

.ai-msg-bubble .message-text img {
    max-width: 100%;
    border-radius: 10px;
}

.ai-msg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    padding: 0 2px;
}

.ai-msg-time {
    font-size: 11px;
    color: #6b7c8f;
}

.ai-msg-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.15s;
}

.chat-msg:hover .ai-msg-actions {
    opacity: 1;
}

.ai-msg-actions .btn {
    padding: 4px 7px;
    color: #6b7c8f;
    border: none;
    background: transparent;
    border-radius: 7px;
}

.ai-msg-actions .btn:hover {
    background: rgba(6, 147, 232, 0.08);
    color: #0693e8;
}

.ai-msg-image {
    margin-top: 8px;
    max-width: 200px;
    border-radius: 10px;
    border: 1px solid #e6ebf0;
}

.ai-typing {
    display: none;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 6px;
    color: #6b7c8f;
    font-size: 13px;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.ai-typing.show {
    display: flex;
}

.ai-typing-dots {
    display: inline-flex;
    gap: 4px;
}

.ai-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0693e8;
    animation: aiBounce 1.2s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

/* ===== Composer ===== */
.ai-composer-wrap {
    padding: 0 20px 16px;
    background: #fafbfc;
    flex-shrink: 0;
}

.ai-composer {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #d5dde6;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(15, 36, 64, 0.05);
    padding: 10px 12px 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ai-composer:focus-within {
    border-color: #0693e8;
    box-shadow: 0 0 0 3px rgba(6, 147, 232, 0.08);
}

.ai-composer.dragover {
    border-color: #0693e8;
    background: #f0f9ff;
}

.ai-attach-preview {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 6px;
    background: #f4f6f8;
    border-radius: 10px;
}

.ai-attach-preview.show {
    display: flex;
}

.ai-attach-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e6ebf0;
}

.ai-attach-info {
    flex: 1;
    min-width: 0;
    font-size: 12px;
}

.ai-attach-info strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-attach-remove {
    border: none;
    background: transparent;
    color: #e11d48;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

.ai-composer textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    line-height: 1.45;
    max-height: 160px;
    min-height: 40px;
    padding: 4px 4px 6px;
    background: transparent;
    color: #152433;
}

.ai-composer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ai-composer-tools {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ai-tool-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: #6b7c8f;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}

.ai-tool-btn:hover:not(:disabled):not(.disabled) {
    background: rgba(6, 147, 232, 0.08);
    color: #0693e8;
}

.ai-tool-btn.disabled,
.ai-tool-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ai-tool-btn.recording {
    background: #fee2e2;
    color: #e11d48;
    animation: aiPulse 1.2s infinite;
}

.ai-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #0693e8;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, opacity 0.15s, transform 0.15s;
    flex-shrink: 0;
}

.ai-send-btn:hover:not(:disabled) {
    background: #0477c2;
}

.ai-send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #0693e8;
    color: #fff;
}

.ai-composer-hint {
    text-align: center;
    font-size: 11px;
    color: #9aabbc;
    margin-top: 8px;
}

.ai-composer-hint kbd {
    background: #fff;
    border: 1px solid #e6ebf0;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 10px;
    color: #6b7c8f;
}

.ai-upload-progress {
    height: 2px;
    background: #e6ebf0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
    display: none;
}

.ai-upload-progress.show { display: block; }
.ai-upload-progress .bar {
    height: 100%;
    width: 0;
    background: #0693e8;
    transition: width 0.2s;
}

.ai-low-limits {
    display: none;
    max-width: 720px;
    margin: 0 auto 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    font-size: 12.5px;
    color: #9a3412;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-low-limits.show { display: flex; }
.ai-low-limits a {
    font-weight: 700;
    color: #0693e8 !important;
    white-space: nowrap;
}

/* ===== Model modal ===== */
.ai-model-grid {
    display: grid;
    gap: 8px;
}

.ai-model-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #e6ebf0;
    border-radius: 12px;
    text-decoration: none !important;
    color: #152433 !important;
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    background: #fff;
}

.ai-model-card:hover {
    border-color: #0693e8;
    box-shadow: 0 2px 10px rgba(6, 147, 232, 0.1);
}

.ai-model-card.recommended {
    border-color: rgba(6, 147, 232, 0.16);
    background: #f8fbfe;
}

.ai-model-card.selected {
    border-color: #0693e8;
    box-shadow: 0 0 0 3px rgba(6, 147, 232, 0.08);
}

.ai-model-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f4f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.ai-model-body { flex: 1; min-width: 0; }

.ai-model-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.ai-model-top strong { font-size: 13.5px; }

.ai-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.ai-badge.rec { background: #dbeafe; color: #1d4ed8; }
.ai-badge.cheap { background: #d1fae5; color: #047857; }
.ai-badge.vision { background: #fef3c7; color: #b45309; }

.ai-model-desc {
    font-size: 12px;
    color: #6b7c8f;
    line-height: 1.4;
    margin: 0 0 4px;
}

.ai-model-price {
    font-size: 11.5px;
    font-weight: 650;
    color: #0693e8;
}

/* Settings */
.ai-settings-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 240px;
    background: #fff;
    border: 1px solid #e6ebf0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 36, 64, 0.12);
    padding: 12px;
    z-index: 20;
}

.ai-settings-panel.show {
    display: block;
    animation: aiFadeUp 0.18s ease;
}

.ai-settings-wrap { position: relative; }

.ai-settings-panel label {
    display: block;
    font-size: 11px;
    font-weight: 650;
    color: #6b7c8f;
    margin-bottom: 4px;
}

.ai-settings-panel .form-control {
    font-size: 13px;
    margin-bottom: 10px;
}

.ai-settings-panel .form-control:last-child { margin-bottom: 0; }

.ai-sidebar-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(15, 36, 64, 0.35);
    z-index: 4;
}

.ai-shell.sidebar-open .ai-sidebar-overlay { display: block; }

/* ===== Landing ===== */
.ai-landing {
    max-width: 880px;
    margin: 0 auto;
    padding: 48px 16px 40px;
}

.ai-landing-hero {
    text-align: center;
    margin-bottom: 36px;
}

.ai-landing-hero h1 {
    font-size: clamp(24px, 3.5vw, 34px);
    font-weight: 750;
    line-height: 1.2;
    margin-bottom: 12px;
    color: #152433;
    letter-spacing: -0.02em;
}

.ai-landing-hero .lead {
    font-size: 15.5px;
    color: #6b7c8f;
    max-width: 560px;
    margin: 0 auto 18px;
    line-height: 1.55;
}

.ai-landing-cta {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.ai-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    background: #0693e8;
    color: #fff !important;
    font-weight: 650;
    text-decoration: none !important;
    border: none;
    transition: background 0.15s;
}

.ai-btn-primary:hover { background: #0477c2; }

.ai-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    background: #fff;
    color: #152433 !important;
    font-weight: 650;
    text-decoration: none !important;
    border: 1px solid #e6ebf0;
}

.ai-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 36px;
}

.ai-feature {
    background: #fff;
    border: 1px solid #e6ebf0;
    border-radius: 14px;
    padding: 18px;
}

.ai-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(6, 147, 232, 0.08);
    color: #0693e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 10px;
}

.ai-feature h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 5px;
}

.ai-feature p {
    margin: 0;
    font-size: 13px;
    color: #6b7c8f;
    line-height: 1.45;
}

.ai-audience {
    background: #152433;
    color: #e8f1f8;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 36px;
}

.ai-audience h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 14px;
    color: #fff;
}

.ai-audience-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-audience-grid li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13.5px;
    line-height: 1.4;
}

.ai-audience-grid i {
    color: #38bdf8;
    margin-top: 2px;
}

.ai-pricing-teaser {
    background: #fff;
    border: 1px solid #e6ebf0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 36px;
    text-align: center;
}

.ai-pricing-teaser h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
}

.ai-pricing-teaser > p {
    color: #6b7c8f;
    margin-bottom: 18px;
    font-size: 14px;
}

.ai-price-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.ai-price-card {
    border: 1px solid #e6ebf0;
    border-radius: 12px;
    padding: 16px 12px;
}

.ai-price-card.highlight {
    border-color: #0693e8;
    background: #f8fbfe;
}

.ai-price-card .label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7c8f;
    letter-spacing: 0.04em;
}

.ai-price-card .amount {
    font-size: 26px;
    font-weight: 800;
    margin: 4px 0;
    color: #152433;
}

.ai-price-card .amount small {
    font-size: 13px;
    font-weight: 600;
    color: #6b7c8f;
}

.ai-price-card .desc {
    font-size: 12.5px;
    color: #6b7c8f;
    margin: 0;
}

.ai-faq .card {
    border: 1px solid #e6ebf0;
    border-radius: 10px !important;
    margin-bottom: 8px;
    overflow: hidden;
}

.ai-faq .card-header {
    background: #fff;
    border: none;
    padding: 2px 6px;
}

.ai-faq .btn-link {
    color: #152433;
    font-weight: 650;
    text-decoration: none !important;
    width: 100%;
    text-align: left;
    padding: 11px;
}

.ai-faq .card-body {
    padding-top: 0;
    color: #6b7c8f;
    font-size: 13.5px;
    line-height: 1.5;
}

.ai-comments { margin-top: 20px; }

.ai-chat .copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 10;
    font-size: 12px;
}

.ai-chat .audio-progress {
    height: 2px;
    margin-top: 8px;
    border-radius: 2px;
    overflow: hidden;
}

.ai-rename-form {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.ai-rename-form input {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e6ebf0;
    background: #fff;
    color: #152433;
}

@keyframes aiFadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes aiBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes aiPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); }
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .ai-shell {
        grid-template-columns: 1fr;
        height: calc(100vh - 120px);
        max-height: none;
    }

    .ai-sidebar {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(280px, 86vw);
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: 8px 0 28px rgba(0, 0, 0, 0.12);
        background: #fff;
    }

    .ai-shell.sidebar-open .ai-sidebar {
        transform: translateX(0);
    }

    .ai-menu-toggle { display: inline-flex; }
    .ai-chat-actions { opacity: 1; }
    .ai-msg-actions { opacity: 1; }

    .ai-toolbar {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
    }

    .ai-toolbar-left {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    .ai-chat-heading {
        max-width: none;
        flex: 1;
        min-width: 0;
    }

    .ai-toolbar-right {
        flex: 1 1 100%;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .ai-toolbar-right .ai-pill {
        flex-shrink: 1;
        min-width: 0;
    }

    #currentModelLabel {
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 42vw;
    }

    .ai-features { grid-template-columns: 1fr 1fr; }
    .ai-price-cards { grid-template-columns: 1fr; }
    .ai-audience-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .ai-app { margin: 0 -15px 28px; padding: 0; }

    .ai-shell {
        border-radius: 0;
        border-left: none;
        border-right: none;
        height: calc(100vh - 110px);
    }

    .ai-prompts { grid-template-columns: 1fr; }
    .ai-features { grid-template-columns: 1fr; }
    .ai-toolbar-right .ai-pill span.hide-xs { display: none; }
    .ai-empty h2 { font-size: 22px; }
    .ai-landing { padding-top: 32px; }
    .ai-composer-hint { display: none; }
}

/* Support widget — left side */
body:has(.ai-app) #contact_widget_button {
    left: 15px;
    right: auto;
}

body:has(.ai-app) #contact_widget_button .contact-widget-dropdown {
    left: 36px;
    right: auto;
}

@media (min-width: 420px) {
    body:has(.ai-app) #contact_widget_button {
        left: 30px;
    }

    body:has(.ai-app) #contact_widget_button .contact-widget-dropdown {
        left: 60px;
    }
}
