/* AI Seyahat Danışmanı - floating widget */
.ai-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 30px;
    z-index: 5900;
    font-family: 'Poppins', sans-serif;
}

.ai-chat-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #0f3d67 0%, #1b6ec2 100%);
    color: #fff;
    padding: 14px 20px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(15, 61, 103, 0.35);
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-chat-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 61, 103, 0.45);
}

.ai-chat-toggle i {
    font-size: 18px;
}

.ai-chat-toggle.is-open {
    display: none;
}

.ai-chat-panel {
    position: fixed;
    right: 24px;
    bottom: 30px;
    width: min(400px, calc(100vw - 32px));
    height: min(620px, calc(100vh - 60px));
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e3ebf7;
}

.ai-chat-header {
    background: linear-gradient(135deg, #0f3d67 0%, #1b6ec2 100%);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-header-title {
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.85;
}

.ai-chat-close:hover {
    opacity: 1;
}

.ai-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f7fbff;
}

.ai-chat-msg {
    max-width: 92%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-chat-msg.user {
    align-self: flex-end;
    background: #0f3d67;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ai-chat-msg.assistant {
    align-self: flex-start;
    background: #ffffff;
    color: #1f2a37;
    border: 1px solid #e3ebf7;
    border-bottom-left-radius: 4px;
}

.ai-chat-msg.system {
    align-self: center;
    background: #eef4ff;
    color: #0f3d67;
    font-size: 12.5px;
    text-align: center;
}

.ai-chat-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e3ebf7;
    border-radius: 14px;
}

.ai-chat-typing span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: ai-chat-blink 1.2s infinite ease-in-out;
}

.ai-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-chat-blink {
    0%, 80%, 100% { opacity: 0.25; }
    40% { opacity: 1; }
}

.ai-chat-handoff {
    align-self: flex-start;
    max-width: 92%;
}

.ai-chat-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ai-chat-whatsapp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
    color: #fff;
}

.ai-chat-whatsapp-btn i {
    font-size: 16px;
}

.ai-chat-tour-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
    align-self: stretch;
}

.ai-chat-tour-card {
    display: flex;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e3ebf7;
    border-radius: 12px;
    padding: 8px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ai-chat-tour-card:hover {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.ai-chat-tour-card img {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
    background: #eef4ff;
}

.ai-chat-tour-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ai-chat-tour-card-name {
    font-weight: 700;
    font-size: 13px;
    color: #0f3d67;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-chat-tour-card-meta {
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-chat-tour-card-price {
    font-size: 12.5px;
    font-weight: 700;
    color: #1b6ec2;
}

.ai-chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 10px 16px;
    background: #f7fbff;
}

.ai-chat-suggestion-chip {
    border: 1px solid #cfe0f7;
    background: #fff;
    color: #0f3d67;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ai-chat-suggestion-chip:hover {
    background: #eef4ff;
}

.ai-chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e3ebf7;
    background: #fff;
}

.ai-chat-input-row input {
    flex: 1 1 auto;
    border: 1px solid #d8e3f3;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13.5px;
    outline: none;
}

.ai-chat-input-row input:focus {
    border-color: #1b6ec2;
}

.ai-chat-send {
    border: none;
    background: #0f3d67;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.ai-chat-send:disabled {
    opacity: 0.6;
    cursor: default;
}

.ai-chat-disclaimer {
    font-size: 10.5px;
    color: #94a3b8;
    text-align: center;
    padding: 4px 12px 10px 12px;
    background: #fff;
}

@media (max-width: 480px) {
    .ai-chat-widget {
        right: 14px;
        bottom: 16px;
    }

    .ai-chat-panel {
        right: 8px;
        bottom: 8px;
        width: calc(100vw - 16px);
        height: calc(100vh - 24px);
        border-radius: 14px;
    }
}
