/* Container Principal */
#dzapy-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Botão Flutuante */
#dzapy-chat-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: dzapy-pulse 2s infinite;
    position: relative;
}

.dzapy-badge {
    position: absolute;
    top: -8px;
    left: -100px;
    background: white;
    color: #25D366;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    animation: dzapy-badge-bounce 2s infinite;
}

@keyframes dzapy-badge-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

#dzapy-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes dzapy-pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* Modal */
#dzapy-chat-modal {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: dzapy-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dzapy-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

/* Header */
.dzapy-modal-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: white;
}

.dzapy-header-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dzapy-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dzapy-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dzapy-title {
    font-weight: 600;
    font-size: 16px;
}

.dzapy-status {
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dzapy-status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: dzapy-blink 2s infinite;
}

@keyframes dzapy-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

#dzapy-close-modal {
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#dzapy-close-modal:hover {
    opacity: 1;
}

/* Body */
.dzapy-modal-body {
    padding: 20px;
    background: #f0f2f5;
    min-height: 200px;
}

/* Mensagens estilo chat */
.dzapy-chat-message {
    background: #dcf8c6;
    padding: 12px 16px;
    border-radius: 12px 12px 12px 4px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #303030;
    animation: dzapy-message-in 0.3s ease;
}

@keyframes dzapy-message-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Form */
.dzapy-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dzapy-input {
    width: 100%;
    border: 2px solid #f3f4f6;
    padding: 14px 16px;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.dzapy-input:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.dzapy-input::placeholder {
    color: #9ca3af;
}

.dzapy-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.dzapy-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.dzapy-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.dzapy-success {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
}

.dzapy-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dzapy-success-pop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dzapy-success-pop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

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

.dzapy-success h3 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #1f2937;
}

.dzapy-success p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsivo */
@media (max-width: 480px) {
    #dzapy-chat-modal {
        width: calc(100vw - 40px);
        bottom: 70px;
    }
}