/* [KH-P07I3-SMART-GARAGE-AI-CONCIERGE:BEGIN] */
.kh-garage-ai-insights {
    position: relative;
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
    overflow: hidden;
    color: var(--tg-theme-text-color, #f5f7fb);
    background:
        radial-gradient(circle at 100% 0, rgba(109, 94, 252, 0.24), transparent 42%),
        linear-gradient(145deg, rgba(28, 33, 50, 0.98), rgba(20, 25, 38, 0.98));
    border: 1px solid rgba(130, 122, 255, 0.38);
    border-radius: 20px;
    box-shadow: 0 16px 38px rgba(5, 8, 18, 0.24);
}

.kh-garage-ai-insights[hidden] {
    display: none !important;
}

.kh-garage-ai-insights::before {
    position: absolute;
    inset: 0 auto auto 0;
    width: 96px;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, #8c7cff, #59c7ff, transparent);
}

.kh-garage-ai-insights__header,
.kh-garage-ai-insights__heading,
.kh-garage-ai-insights__footer {
    display: flex;
    align-items: center;
}

.kh-garage-ai-insights__header {
    justify-content: space-between;
    gap: 12px;
}

.kh-garage-ai-insights__heading {
    gap: 11px;
    min-width: 0;
}

.kh-garage-ai-insights__mark {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #fff;
    font-size: 22px;
    background: linear-gradient(135deg, #7868f8, #39bce8);
    border-radius: 13px;
    box-shadow: 0 8px 24px rgba(89, 106, 255, 0.34);
}

.kh-garage-ai-insights__eyebrow,
.kh-garage-ai-insights__title,
.kh-garage-ai-insights__explanation,
.kh-garage-ai-insights__disclaimer,
.kh-garage-ai-insights__live {
    margin: 0;
}

.kh-garage-ai-insights__eyebrow {
    color: #a9a2ff;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.11em;
    line-height: 1.2;
    text-transform: uppercase;
}

.kh-garage-ai-insights__title {
    margin-top: 3px;
    color: inherit;
    font-size: clamp(18px, 4.7vw, 22px);
    font-weight: 780;
    line-height: 1.15;
}

.kh-garage-ai-insights__icon-button,
.kh-garage-ai-insights__secondary-button,
.kh-garage-ai-insights__action {
    min-height: 44px;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.kh-garage-ai-insights__icon-button {
    flex: 0 0 44px;
    width: 44px;
    padding: 0;
    color: #d8d5ff;
    font-size: 23px;
    line-height: 1;
    background: rgba(125, 111, 255, 0.12);
    border: 1px solid rgba(153, 143, 255, 0.28);
    border-radius: 14px;
}

.kh-garage-ai-insights__icon-button:disabled,
.kh-garage-ai-insights__secondary-button:disabled {
    cursor: wait;
    opacity: 0.58;
}

.kh-garage-ai-insights__state {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 12px 13px;
    color: rgba(244, 246, 252, 0.8);
    font-size: 14px;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.045);
    border-radius: 14px;
}

.kh-garage-ai-insights__state[hidden],
#kh-garage-ai-insights-content[hidden] {
    display: none !important;
}

.kh-garage-ai-insights__state--error {
    align-items: flex-start;
    flex-direction: column;
    color: #ffd5d8;
    background: rgba(218, 64, 78, 0.1);
    border: 1px solid rgba(255, 104, 118, 0.18);
}

.kh-garage-ai-insights__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(179, 173, 255, 0.28);
    border-top-color: #b9b3ff;
    border-radius: 50%;
    animation: kh-garage-ai-insights-spin 0.8s linear infinite;
}

.kh-garage-ai-insights__secondary-button {
    padding: 9px 14px;
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
}

.kh-garage-ai-insights__explanation {
    color: rgba(248, 249, 253, 0.94);
    font-size: 15px;
    line-height: 1.55;
    white-space: pre-line;
}

.kh-garage-ai-insights__actions {
    display: grid;
    gap: 9px;
    margin-top: 15px;
}

.kh-garage-ai-insights__action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    width: 100%;
    padding: 12px 13px;
    color: inherit;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(174, 169, 255, 0.19);
    border-radius: 14px;
}

.kh-garage-ai-insights__action:hover {
    background: rgba(132, 120, 255, 0.13);
    border-color: rgba(174, 169, 255, 0.38);
}

.kh-garage-ai-insights__action-label {
    grid-column: 1;
    color: #fff;
    font-size: 14px;
    font-weight: 760;
    line-height: 1.3;
}

.kh-garage-ai-insights__action-reason {
    grid-column: 1;
    color: rgba(232, 233, 242, 0.7);
    font-size: 12px;
    line-height: 1.4;
}

.kh-garage-ai-insights__action-arrow {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    color: #a9a2ff;
    font-size: 24px;
}

.kh-garage-ai-insights__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kh-garage-ai-insights__source {
    padding: 4px 8px;
    color: #bfbaff;
    font-size: 11px;
    font-weight: 720;
    background: rgba(128, 113, 255, 0.11);
    border-radius: 999px;
}

.kh-garage-ai-insights__disclaimer {
    color: rgba(229, 231, 240, 0.58);
    font-size: 11px;
    line-height: 1.45;
}

.kh-garage-ai-insights__live {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.kh-garage-ai-insights__icon-button:focus-visible,
.kh-garage-ai-insights__secondary-button:focus-visible,
.kh-garage-ai-insights__action:focus-visible {
    outline: 3px solid rgba(107, 193, 255, 0.9);
    outline-offset: 2px;
}

@keyframes kh-garage-ai-insights-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .kh-garage-ai-insights {
        gap: 12px;
        padding: 15px;
        border-radius: 17px;
    }

    .kh-garage-ai-insights__mark {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        font-size: 19px;
        border-radius: 12px;
    }

    .kh-garage-ai-insights__action {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh-garage-ai-insights__spinner {
        animation: none;
    }

    .kh-garage-ai-insights *,
    .kh-garage-ai-insights *::before,
    .kh-garage-ai-insights *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
/* [KH-P07I3-SMART-GARAGE-AI-CONCIERGE:END] */

/* [KH-P07M5-EFFECTIVE-SCHEME-GARAGE-AI-INSIGHTS:BEGIN] */
html[data-kh-scheme="dark"] .kh-garage-ai-insights {
    --kh-p07m5-garage-scheme: dark;
}

html[data-kh-scheme="light"] .kh-garage-ai-insights {
    --kh-p07m5-garage-scheme: light;
    color: var(--tg-theme-text-color, #17212b);
    background:
        radial-gradient(circle at 100% 0, rgba(109, 94, 252, 0.16), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(242, 243, 253, 0.98));
    background-color: #f9f9ff;
    border-color: rgba(103, 91, 214, 0.28);
    box-shadow: 0 16px 38px rgba(20, 28, 68, 0.12);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__eyebrow,
html[data-kh-scheme="light"] .kh-garage-ai-insights__action-arrow {
    color: #5f55c9;
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__icon-button {
    color: #5f55c9;
    background: rgba(103, 91, 214, 0.10);
    border-color: rgba(103, 91, 214, 0.24);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__state {
    color: var(--tg-theme-hint-color, #708499);
    background: var(--tg-theme-secondary-bg-color, #eef2f7);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__state--error {
    color: var(--tg-theme-destructive-text-color, #e53935);
    background: rgba(218, 64, 78, 0.08);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__secondary-button {
    color: var(--tg-theme-text-color, #17212b);
    background: var(--tg-theme-secondary-bg-color, #eef2f7);
    border-color: rgba(112, 132, 153, 0.24);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__explanation,
html[data-kh-scheme="light"] .kh-garage-ai-insights__action-label {
    color: var(--tg-theme-text-color, #17212b);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__action {
    color: var(--tg-theme-text-color, #17212b);
    background: rgba(103, 91, 214, 0.06);
    border-color: rgba(103, 91, 214, 0.18);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__action:hover {
    background: rgba(103, 91, 214, 0.10);
    border-color: rgba(103, 91, 214, 0.30);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__action-reason,
html[data-kh-scheme="light"] .kh-garage-ai-insights__disclaimer {
    color: var(--tg-theme-hint-color, #708499);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__footer {
    border-top-color: rgba(112, 132, 153, 0.16);
}

html[data-kh-scheme="light"] .kh-garage-ai-insights__source {
    color: #5f55c9;
    background: rgba(103, 91, 214, 0.09);
}
/* [KH-P07M5-EFFECTIVE-SCHEME-GARAGE-AI-INSIGHTS:END] */
