/* ==========================================================================
   KAMA AI - Akıllı Seyahat & VIP Transfer Asistanı Stilleri
   ========================================================================== */

/* 1. KAMA AI Sabit Butonu (Floating Launcher) */
.kama-ai-launcher {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9980;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #0b1d3a 0%, #172c54 60%, #f26522 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(11, 29, 58, 0.35), 0 0 20px rgba(242, 101, 34, 0.3);
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}

.kama-ai-launcher:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 14px 36px rgba(11, 29, 58, 0.45), 0 0 28px rgba(242, 101, 34, 0.5);
    border-color: rgba(255, 191, 0, 0.6);
}

.kama-ai-icon-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    background: #ffffff;
    color: #0b1d3a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.kama-ai-pulse-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
    animation: kamaAiPulse 2s infinite;
}

@keyframes kamaAiPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.kama-ai-launcher-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.kama-ai-launcher-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kama-ai-launcher-badge {
    background: #f26522;
    color: #fff;
    font-size: 9.5px;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

.kama-ai-launcher-sub {
    font-size: 10.5px;
    color: #cbd5e1;
    font-weight: 500;
}

/* 2. Chat Penceresi (Widget Box) */
.kama-ai-window {
    position: fixed;
    bottom: 84px;
    right: 25px;
    z-index: 9995;
    width: 390px;
    max-width: calc(100vw - 30px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 60px rgba(11, 29, 58, 0.28), 0 0 1px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.kama-ai-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.kama-ai-header {
    background: linear-gradient(135deg, #0b1d3a 0%, #13284f 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #f26522;
    position: relative;
    flex-shrink: 0;
}

.kama-ai-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kama-ai-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #f26522 0%, #d95315 100%);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(242, 101, 34, 0.35);
}

.kama-ai-title-wrap h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kama-ai-status-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.kama-ai-live-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.kama-ai-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kama-ai-btn-ctrl {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s;
}

.kama-ai-btn-ctrl:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Chat Messages Stream */
.kama-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.kama-ai-msg {
    display: flex;
    flex-direction: column;
    max-width: 86%;
    animation: kamaAiFadeIn 0.25s ease-out;
}

@keyframes kamaAiFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.kama-ai-msg-ai {
    align-self: flex-start;
}

.kama-ai-msg-user {
    align-self: flex-end;
}

.kama-ai-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.55;
    word-break: break-word;
}

.kama-ai-msg-ai .kama-ai-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.kama-ai-msg-user .kama-ai-bubble {
    background: linear-gradient(135deg, #0b1d3a 0%, #1c3b6f 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(11, 29, 58, 0.15);
}

.kama-ai-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 4px;
}

.kama-ai-msg-user .kama-ai-time {
    align-self: flex-end;
}

/* Rich Cards Inside Messages */
.kama-ai-cards-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.kama-ai-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.kama-ai-card-item:hover {
    border-color: #f26522;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(242, 101, 34, 0.12);
}

.kama-ai-card-thumb {
    width: 60px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}

.kama-ai-card-details {
    flex: 1;
    min-width: 0;
}

.kama-ai-card-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0b1d3a;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kama-ai-card-price {
    font-size: 11.5px;
    font-weight: 800;
    color: #f26522;
}

.kama-ai-card-action {
    color: #0b1d3a;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    background: #eff6ff;
    flex-shrink: 0;
}

/* Quick Replies (Pill Buttons) */
.kama-ai-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.kama-ai-quick-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.kama-ai-quick-btn:hover {
    background: #0b1d3a;
    color: #ffffff;
    border-color: #0b1d3a;
    transform: translateY(-1px);
}

/* Typing Indicator */
.kama-ai-typing {
    display: none;
    align-self: flex-start;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.kama-ai-typing.active {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kama-ai-typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: kamaAiBounce 1.4s infinite ease-in-out both;
}

.kama-ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.kama-ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes kamaAiBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.kama-ai-typing-label {
    font-size: 11px;
    color: #64748b;
    margin-left: 6px;
}

/* Input Area */
.kama-ai-footer {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.kama-ai-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    padding: 4px 6px 4px 14px;
    transition: all 0.2s;
}

.kama-ai-input-form:focus-within {
    border-color: #0b1d3a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(11, 29, 58, 0.1);
}

.kama-ai-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    outline: none;
    padding: 8px 0;
}

.kama-ai-input::placeholder {
    color: #94a3b8;
}

.kama-ai-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f26522;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.kama-ai-send-btn:hover {
    background: #d95315;
    transform: scale(1.05);
}

.kama-ai-disclaimer {
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    margin-top: 6px;
}

/* Mobil Görünüm Uyarlaması */
@media (max-width: 640px) {
    .kama-ai-launcher {
        bottom: 72px;
        right: 14px;
        left: auto;
        padding: 9px 14px;
        font-size: 12px;
    }
    .kama-ai-launcher-sub {
        display: none;
    }
    .kama-ai-window {
        bottom: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        height: calc(100vh - 90px);
        max-height: 560px;
        border-radius: 18px;
    }
}
