.ai-v3-widget {
    max-width: 768px;
    margin: 16px 0;
    padding: 0 16px 20px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

.ai-v3-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    box-sizing: border-box;
    width: 100%;
}

.ai-v3-answer {
    margin-top: 12px;
    margin-left: 10px;
    margin-bottom: 12px;
    display: none;
}

.ai-v3-answer-inner {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f5f7fb;
    border: 1px solid #e0e4f0;
    position: relative;
}

.ai-v3-logo {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.ai-v3-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ai-v3-input-wrapper {
    flex: 1 1 auto;
}

.ai-v3-input {
    width: 100%;
    border: none;
    outline: none;
    font: inherit;
    padding: 6px 2px;
    color: #333;
    background: transparent;
}

.ai-v3-input::placeholder {
    color: #aaa;
}

.ai-v3-submit {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.ai-v3-submit[disabled] {
    cursor: default;
    background: #ccc;
    opacity: 0.7;
}

.ai-v3-arrow {
    font-size: 14px;
    line-height: 1;
    transform: translateY(-1px);
}

.ai-v3-answer-inner::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 30px;
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent #e0e4f0 transparent;
}

.ai-v3-answer-inner::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 31px;
    border-width: 0 7px 7px 7px;
    border-style: solid;
    border-color: transparent transparent #f5f7fb transparent;
}

.ai-v3-answer-icon-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ai-v3-answer-icon {
    font-size: 16px;
    line-height: 1;
    margin-top: 2px;
}

.ai-v3-answer-texts {
    max-width: 100%;
}

.ai-v3-question-label,
.ai-v3-answer-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #777;
    margin-bottom: 2px;
}

.ai-v3-question-text {
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
}

.ai-v3-answer-text {
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
}

.ai-v3-label-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.ai-v3-label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-v3-label-text {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #777;
}

.ai-v3-error {
    color: #c00;
}

.ai-v3-loading {
    opacity: 0.8;
}

@media (max-width: 420px) {
    .ai-v3-input {
        font-size: 16px;
    }
    .ai-v3-input::placeholder {
        font-size: 16px;
    }
    .ai-v3-input-row {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 8px;
        row-gap: 6px;
        align-items: center;
        border-radius: 16px;
    }
    .ai-v3-logo {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
    }
    .ai-v3-input-wrapper {
        grid-column: 2;
        grid-row: 1;
    }
    .ai-v3-submit {
        grid-column: 2;
        grid-row: 2;
        justify-self: flex-end;
        margin-top: 4px;
    }
    .ai-v3-answer-inner::before,
    .ai-v3-answer-inner::after {
        left: 24px;
    }
}