.post-v2-footer--with-ai {
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.post-v2-footer-main {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    min-width: 0;
}

.post-v2-footer-side {
    margin-left: auto;
}

.post-v2-ai-trigger,
.job-card-btn-ai {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-v2-ai-trigger {
    padding-inline: 14px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(59, 130, 246, 0.08));
    color: #0284c7;
}

.post-v2-ai-trigger:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(59, 130, 246, 0.12));
    color: #0369a1;
}

.post-v2-ai-trigger .material-symbols-outlined,
.job-card-btn-ai .material-symbols-outlined {
    font-size: 18px;
}

.job-card-btn-ai {
    font-weight: 700;
    border-color: rgba(var(--bs-primary-rgb), 0.28);
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.08), rgba(56, 189, 248, 0.05));
}

.job-card-btn-ai:hover {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.14), rgba(56, 189, 248, 0.1));
}

[data-ai-insight-trigger].is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.ai-insight-inline-shell {
    margin: 0.25rem 1rem 1rem;
}

.ai-insight-inline-card {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.1), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    box-shadow: 0 28px 65px -48px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.ai-insight-inline-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.5rem;
}

.ai-insight-inline-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ai-insight-inline-kicker .material-symbols-outlined {
    font-size: 1rem;
}

.ai-insight-inline-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.7rem;
}

.ai-insight-inline-subtext {
    color: #64748b;
    font-size: 0.92rem;
    margin: 0 1rem 1rem;
}

.ai-insight-inline-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.72);
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-insight-inline-body {
    padding: 0 1rem 1rem;
}

.ai-insight-inline-loading,
.ai-insight-inline-error {
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ai-insight-inline-loading__orb,
.ai-insight-inline-error__icon {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(37, 99, 235, 0.12));
    color: #0284c7;
}

.ai-insight-inline-loading__orb .material-symbols-outlined,
.ai-insight-inline-error__icon .material-symbols-outlined {
    font-size: 1.8rem;
}

.ai-insight-result {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-insight-summary-card,
.ai-insight-panel,
.ai-insight-next-step {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 44px -40px rgba(15, 23, 42, 0.28);
}

.ai-insight-summary-card,
.ai-insight-next-step {
    padding: 1rem 1.05rem;
}

.ai-insight-panel {
    padding: 1rem;
}

.ai-insight-summary-card__header,
.ai-insight-panel__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    color: #0f172a;
}

.ai-insight-summary-card__header .material-symbols-outlined,
.ai-insight-panel__title .material-symbols-outlined {
    font-size: 1.15rem;
    color: #0ea5e9;
}

.ai-insight-scope {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.ai-insight-scope-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
}

.ai-insight-scope-badge .material-symbols-outlined {
    font-size: 1rem;
    color: #0284c7;
}

.ai-insight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ai-insight-list {
    list-style: none;
    padding: 0;
}

.ai-insight-list li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.7rem;
    color: #334155;
    line-height: 1.6;
}

.ai-insight-list li:last-child {
    margin-bottom: 0;
}

.ai-insight-list li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.68rem;
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.ai-insight-question-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.ai-insight-comment-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.ai-insight-comment-group {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.9));
    padding: 0.95rem;
}

.ai-insight-comment-group--clinical {
    box-shadow: inset 0 3px 0 rgba(8, 145, 178, 0.18);
}

.ai-insight-comment-group--social {
    box-shadow: inset 0 3px 0 rgba(14, 165, 233, 0.18);
}

.ai-insight-comment-group--professional {
    box-shadow: inset 0 3px 0 rgba(59, 130, 246, 0.18);
}

.ai-insight-comment-group__header {
    margin-bottom: 0.85rem;
}

.ai-insight-comment-group__title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
    color: #0f172a;
}

.ai-insight-comment-group__title .material-symbols-outlined {
    font-size: 1.05rem;
    color: #0284c7;
}

.ai-insight-comment-group__hint {
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.5;
}

.ai-insight-comment-list {
    flex-direction: column;
    align-items: stretch;
}

.ai-insight-question,
.ai-insight-comment {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(14, 165, 233, 0.18);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(37, 99, 235, 0.05));
    color: #0f172a;
    border-radius: 16px;
    padding: 0.7rem 0.85rem;
    font-weight: 600;
    text-align: left;
}

.ai-insight-question:hover,
.ai-insight-comment:hover {
    border-color: rgba(14, 165, 233, 0.32);
    color: #0f172a;
}

.ai-insight-question .material-symbols-outlined,
.ai-insight-comment .material-symbols-outlined {
    font-size: 1rem;
    color: #0284c7;
}

.ai-insight-comment {
    width: 100%;
    justify-content: flex-start;
}

.ai-insight-actions {
    display: flex;
    justify-content: flex-end;
}

.ai-insight-open-chat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 16px 38px -24px rgba(37, 99, 235, 0.6);
}

.ai-insight-open-chat:hover {
    color: #fff;
    filter: brightness(0.96);
}

.ai-insight-inline-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
}

.ai-insight-inline-meta .material-symbols-outlined {
    font-size: 1rem;
}

[data-theme="dark"] .post-v2-ai-trigger {
    border-color: rgba(56, 189, 248, 0.18);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(37, 99, 235, 0.14));
    color: #7dd3fc;
}

[data-theme="dark"] .job-card-btn-ai {
    border-color: rgba(56, 189, 248, 0.18);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(37, 99, 235, 0.14));
    color: #e2e8f0;
}

[data-theme="dark"] .job-card-btn-ai:hover,
[data-theme="dark"] .post-v2-ai-trigger:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.26), rgba(37, 99, 235, 0.2));
}

[data-theme="dark"] .ai-insight-inline-card {
    border-color: rgba(51, 65, 85, 0.88);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
    box-shadow: none;
}

[data-theme="dark"] .ai-insight-inline-title,
[data-theme="dark"] .ai-insight-summary-card__header,
[data-theme="dark"] .ai-insight-panel__title,
[data-theme="dark"] .ai-insight-question,
[data-theme="dark"] .ai-insight-comment {
    color: #e2e8f0;
}

[data-theme="dark"] .ai-insight-inline-subtext,
[data-theme="dark"] .ai-insight-inline-meta,
[data-theme="dark"] .ai-insight-inline-loading p,
[data-theme="dark"] .ai-insight-inline-error p,
[data-theme="dark"] .ai-insight-list li,
[data-theme="dark"] .ai-insight-next-step p,
[data-theme="dark"] .ai-insight-summary-card p {
    color: #94a3b8 !important;
}

[data-theme="dark"] .ai-insight-summary-card,
[data-theme="dark"] .ai-insight-panel,
[data-theme="dark"] .ai-insight-next-step {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(51, 65, 85, 0.72);
    box-shadow: none;
}

[data-theme="dark"] .ai-insight-scope-badge,
[data-theme="dark"] .ai-insight-inline-close {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(51, 65, 85, 0.72);
    color: #cbd5e1;
}

[data-theme="dark"] .ai-insight-question,
[data-theme="dark"] .ai-insight-comment {
    border-color: rgba(51, 65, 85, 0.82);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(37, 99, 235, 0.1));
}

[data-theme="dark"] .ai-insight-comment-group {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.92));
    border-color: rgba(51, 65, 85, 0.72);
}

[data-theme="dark"] .ai-insight-comment-group__title {
    color: #e2e8f0;
}

[data-theme="dark"] .ai-insight-comment-group__hint {
    color: #94a3b8;
}

@media (max-width: 767.98px) {
    .post-v2-footer-side {
        width: 100%;
        margin-left: 0;
    }

    .post-v2-ai-trigger {
        width: 100%;
        justify-content: center;
    }

    .ai-insight-inline-shell {
        margin-left: 0;
        margin-right: 0;
    }

    .ai-insight-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ai-insight-comment-groups {
        grid-template-columns: minmax(0, 1fr);
    }
}
