/* 
   Chutki AI Chatbot Styles
   Premium Glassmorphism & Modern UI
*/

:root {
    --cb-primary: #FFD700;
    --cb-primary-dark: #F59E0B;
    --cb-bg: rgba(255, 255, 255, 0.95);
    --cb-text: #111827;
    --cb-text-muted: #6b7280;
    --cb-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --cb-radius: 24px;
}

/* Chatbot Trigger Button */
.chatbot-trigger {
    /* Styles inherited from original btn-primary */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    position: relative;
}

.chatbot-trigger:hover {
    transform: scale(1.1) rotate(5deg);
}

.chatbot-trigger .pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 215, 0, 0.4);
    border-radius: 50%;
    z-index: -1;
    animation: cb-pulse 2s infinite;
}

@keyframes cb-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 400px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: var(--cb-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--cb-radius);
    box-shadow: var(--cb-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 999;
}

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

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #111827 0%, #1F2937 100%);
    padding: 18px 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

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

.chatbot-header .bot-avatar {
    width: 40px;
    height: 40px;
    background: var(--cb-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chatbot-header p {
    margin: 0;
    font-size: 11px;
    opacity: 0.8;
}

.close-chatbot {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Content */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

/* Message Bubbles */
.msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: msg-in 0.3s ease;
    white-space: pre-wrap;
}

@keyframes msg-in {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg.bot {
    background: white;
    color: var(--cb-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.msg.user {
    background: var(--cb-primary);
    color: #111827;
    font-weight: 600;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

/* Input Area */
.chatbot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input-area input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input-area input:focus {
    border-color: var(--cb-primary);
}

.send-msg-btn {
    width: 40px;
    height: 40px;
    background: var(--cb-primary);
    color: #111827;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.send-msg-btn:hover {
    background: var(--cb-primary-dark);
    transform: scale(1.05);
}

/* Custom Components in Chat */

/* Vehicle Cards */
.cb-vehicle-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.cb-vehicle-card {
    background: white;
    border: 1.5px solid #f0f0f0;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.cb-vehicle-card:hover {
    border-color: var(--cb-primary);
    background: #f0fdf9;
}

.cb-vehicle-card.selected {
    border-color: var(--cb-primary);
    background: #f0fdf9;
    box-shadow: 0 4px 12px rgba(1, 170, 133, 0.1);
}

.cb-v-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-v-img {
    width: 50px;
    height: 30px;
    object-fit: contain;
}

.cb-v-name {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 2px;
}

.cb-v-desc {
    font-size: 11px;
    color: var(--cb-text-muted);
}

.cb-v-price {
    font-weight: 800;
    color: var(--cb-primary);
    font-size: 15px;
}

/* Booking Summary Card */
.cb-summary-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 15px;
    font-size: 13px;
}

.cb-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cb-summary-label {
    color: var(--cb-text-muted);
    font-weight: 500;
}

.cb-summary-value {
    font-weight: 700;
    color: var(--cb-text);
    text-align: right;
    max-width: 60%;
}

/* Quick Action Buttons */
.cb-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.cb-action-btn {
    background: white;
    border: 1px solid var(--cb-primary);
    color: var(--cb-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cb-action-btn:hover {
    background: var(--cb-primary);
    color: white;
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #aaa;
    border-radius: 50%;
    animation: cb-typing 1s infinite ease-in-out;
}

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

@keyframes cb-typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .chatbot-window {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}
