.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chat-widget__toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.chat-widget__toggle:hover {
    transform: scale(1.05);
}

.chat-widget__toggle-icon {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Desktop styles (default) */
.chat-widget__container {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 360px;
    height: 520px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    flex-direction: column;
    animation: chatSlideUp 0.3s ease forwards;
}

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

/* Mobile styles */
@media (max-width: 768px) {
    .chat-widget__container {
        top: 50%;
        left: 50%;
        bottom: auto;
        right: auto;
        transform: translate(-50%, -50%);
        animation: chatFadeIn 0.3s ease forwards;
    }

    @keyframes chatFadeIn {
        from {
            transform: translate(-50%, -45%);
            opacity: 0;
        }
        to {
            transform: translate(-50%, -50%);
            opacity: 1;
        }
    }
}

.chat-widget__container.active {
    display: flex;
}

/* Add a semi-transparent overlay when chat is open */
.chat-widget__overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 999;
    animation: overlayAppear 0.3s ease forwards;
}

@keyframes overlayAppear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chat-widget__overlay.active {
    display: block;
}

.chat-widget__header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: black;
    color: white;
    gap: 1rem;
}

.chat-widget__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-widget__avatar svg {
    width: 24px;
    height: 24px;
    fill: #666;
}

.chat-widget__title {
    flex: 1;
}

.chat-widget__name {
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.chat-widget__status {
    font-size: 0.85rem;
    margin: 0;
    color: #a0a0a0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-widget__status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.chat-widget__close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.chat-widget__close:hover {
    opacity: 1;
}

.chat-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 80%;
    animation: messageAppear 0.3s ease forwards;
}

.chat-message--bot {
    background: #f0f0f0;
    align-self: flex-start;
}

.chat-message--user {
    background: black;
    color: white;
    align-self: flex-end;
}

.chat-section-title {
    font-size: 0.9rem;
    color: #666;
    margin: 1rem 0 0.5rem;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: optionsAppear 0.3s ease forwards;
}

.chat-option {
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.chat-option:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
}

.chat-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: formAppear 0.3s ease forwards;
}

.chat-widget__input-field {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.chat-widget__input-field:focus {
    outline: none;
    border-color: var(--color-accent);
}

textarea.chat-widget__input-field {
    height: 100px;
    resize: none;
}

.chat-widget__submit {
    padding: 0.75rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.chat-widget__submit:hover {
    background: #1ea952;
}

.chat-widget__whatsapp-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

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

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

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