/* Flash Chatbot v2.0 - Premium Dark Aesthetic */
:root {
    --fc-black: #0F0F0F;
    --fc-pure-black: #000000;
    --fc-yellow: #FFD737;
    --fc-white: #FFFFFF;
    --fc-gray: #333333;
    --fc-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --fc-font: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Container */
#flash-chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    font-family: var(--fc-font);
}

/* Floating Action Button */
#flash-chatbot-toggle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--fc-yellow);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--fc-transition);
    animation: fc-pulse 2s infinite;
}

#flash-chatbot-toggle:hover {
    transform: scale(1.1);
    animation: none;
}

.flash-icon {
    font-size: 32px;
    line-height: 1;
}

@keyframes fc-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 55, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 215, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 55, 0);
    }
}

/* Chat Window */
#flash-chatbot-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 580px;
    background: var(--fc-pure-black);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: var(--fc-transition);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#flash-chatbot-window.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

/* Header */
.flash-chatbot-header {
    background: #111;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.flash-avatar {
    width: 40px;
    height: 40px;
    background: var(--fc-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.flash-header-info h3 {
    margin: 0;
    color: var(--fc-white);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.5px;
}

.flash-header-info p {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    font-weight: 600;
}

#flash-chatbot-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px 10px;
}

#flash-chatbot-close:hover {
    color: var(--fc-white);
}

/* Messages Area */
#flash-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

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

#flash-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#flash-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Message Bubbles */
.flash-message {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: fc-fadeInUp 0.3s ease forwards;
}

@keyframes fc-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flash-message p {
    margin: 0;
}

.bot-message {
    background: #1A1A1A;
    color: var(--fc-white);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: var(--fc-yellow);
    color: var(--fc-black);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 600;
}

/* Typing Indicator */
.bot-message.typing-indicator {
    padding: 14px 20px;
}

.bot-message.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--fc-yellow);
    border-radius: 50%;
    margin-right: 4px;
    animation: typing 1.4s infinite ease-in-out both;
}

.bot-message.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.bot-message.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* ==================== */
/* Category Buttons */
/* ==================== */
.flash-category-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 8px;
    animation: fc-fadeInUp 0.4s ease forwards;
}

.flash-category-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--fc-white);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    font-family: var(--fc-font);
}

.flash-category-btn:hover:not(.disabled) {
    background: rgba(255, 215, 55, 0.1);
    border-color: rgba(255, 215, 55, 0.4);
    color: var(--fc-yellow);
    transform: translateX(4px);
}

.flash-category-btn .cat-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.flash-category-btn .cat-label {
    flex: 1;
}

.flash-category-btn .cat-count {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    font-weight: 500;
}

.flash-category-btn .cat-count::after {
    content: ' modelos';
}

.flash-category-btn.selected {
    background: var(--fc-yellow) !important;
    color: #000 !important;
    border-color: var(--fc-yellow) !important;
}

.flash-category-btn.selected .cat-count {
    color: rgba(0, 0, 0, 0.5);
}

.flash-category-btn.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* ==================== */
/* Car Cards */
/* ==================== */
.flash-chatbot-cards-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 0 12px;
    align-self: flex-start;
    max-width: 100%;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.flash-chatbot-cards-carousel::-webkit-scrollbar {
    height: 3px;
}

.flash-chatbot-cards-carousel::-webkit-scrollbar-thumb {
    background: var(--fc-yellow);
    border-radius: 4px;
}

.flash-car-card {
    flex: 0 0 180px;
    display: block;
    background: #111;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
}

.flash-car-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 55, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

img.flash-car-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    background-color: #1a1a1a;
}

.flash-car-info {
    padding: 10px 12px 12px;
}

.flash-car-brand {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 2px;
}

.flash-car-title {
    margin: 0 0 6px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--fc-white);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.flash-car-price {
    font-size: 0.8rem;
    color: var(--fc-yellow);
    font-weight: 700;
}

/* ==================== */
/* Input Area */
/* ==================== */
.flash-chatbot-input-area {
    padding: 14px 18px;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

#flash-chatbot-form {
    display: flex;
    background: var(--fc-pure-black);
    border-radius: 50px;
    padding: 4px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.3s;
}

#flash-chatbot-form:focus-within {
    border-color: var(--fc-yellow);
}

#flash-chatbot-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--fc-white);
    font-size: 0.9rem;
    font-family: var(--fc-font);
    padding: 10px 0;
}

#flash-chatbot-input:focus {
    outline: none;
}

#flash-chatbot-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#flash-chatbot-send {
    background: transparent;
    border: none;
    color: var(--fc-yellow);
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

#flash-chatbot-send:hover {
    transform: scale(1.15) translateX(2px);
}

#flash-chatbot-send svg {
    width: 20px;
    height: 20px;
}

/* ==================== */
/* Responsive */
/* ==================== */
@media (max-width: 480px) {
    #flash-chatbot-window {
        width: calc(100vw - 30px);
        height: 80vh;
        bottom: 80px;
        right: -15px;
    }

    #flash-chatbot-container {
        right: 15px;
        bottom: 15px;
    }

    .flash-car-card {
        flex: 0 0 170px;
    }
}