.tripsee-ai-widget {
    max-width: 500px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    background: #fff;
}
.tripsee-ai-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tripsee-ai-header .icon {
    font-size: 20px;
}
.tripsee-ai-body {
    max-height: 350px;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
}
.tripsee-ai-body:empty::after {
    content: 'Задайте вопрос о локации...';
    color: #aaa;
    text-align: center;
    display: block;
    padding: 20px;
    font-size: 14px;
}
.tripsee-ai-message {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 85%;
    word-wrap: break-word;
    animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tripsee-ai-message.user {
    background: #f0f4ff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    color: #1a1a2e;
}
.tripsee-ai-message.assistant {
    background: #f8f9fa;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: #333;
}
.tripsee-ai-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.tripsee-ai-footer textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    resize: none;
    outline: none;
    min-height: 20px;
    max-height: 60px;
    font-family: inherit;
    transition: border 0.2s;
}
.tripsee-ai-footer textarea:focus {
    border-color: #55a197;
}
.tripsee-ai-footer button {
    background: #55a197;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tripsee-ai-footer button:hover {
    background: #3e877e;
}
.tripsee-ai-footer button:active {
    transform: scale(0.94);
}
.tripsee-ai-footer button:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.tripsee-ai-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4757;
    color: #fff;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 99999;
    box-shadow: 0 6px 20px rgba(255,71,87,0.4);
    animation: slideDown 0.3s ease;
    text-align: center;
    max-width: 90%;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.tripsee-ai-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    align-self: flex-start;
}
.tripsee-ai-typing span {
    width: 7px;
    height: 7px;
    background: #ccc;
    border-radius: 50%;
    animation: bounce 1.2s infinite;
}
.tripsee-ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.tripsee-ai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

/* ==========================================
   Conversational Dialogue UI (Modal Chat)
   ========================================== */
.ai-dialog-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 4px;
    background: transparent !important;
    border: none !important;
}

.ai-dialog-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: aiFadeIn 0.35s ease;
}

@keyframes aiFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-dialog-question {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    justify-content: flex-end;
    align-self: flex-end;
    max-width: 90%;
}

.ai-dialog-question-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(85, 161, 151, 0.1);
    color: #55a197;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.dark-theme .ai-dialog-question-icon {
    background-color: rgba(85, 161, 151, 0.2);
    color: #55a197;
}

.ai-dialog-question-bubble {
    background-color: #eef2ff;
    border: 1px solid #dee2e6;
    border-radius: 12px 0 12px 12px;
    padding: 10px 14px;
    color: #1e293b;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.dark-theme .ai-dialog-question-bubble {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

.ai-dialog-answer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    align-self: flex-start;
    max-width: 90%;
}

.ai-dialog-answer-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(85, 161, 151, 0.15);
    color: #3e877e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.dark-theme .ai-dialog-answer-icon {
    background-color: rgba(85, 161, 151, 0.25);
    color: #55a197;
}

.ai-dialog-answer-bubble {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0 12px 12px 12px;
    padding: 10px 14px;
    color: #334155;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    line-height: 1.5;
}

.dark-theme .ai-dialog-answer-bubble {
    background-color: #0f172a;
    border-color: #1e293b;
    color: #cbd5e1;
}

.ai-dialog-answer-bubble.loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
}

