/* WhatsApp Form Widget Styles */
.whatsapp-widget {
    position: fixed;
    z-index: 9999;
}

.whatsapp-widget.bottom-right {
    bottom: 20px;
    right: 20px;
}

.whatsapp-widget.bottom-left {
    bottom: 20px;
    left: 20px;
}

.whatsapp-widget.top-right {
    top: 20px;
    right: 20px;
}

.whatsapp-widget.top-left {
    top: 20px;
    left: 20px;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.whatsapp-button:active {
    transform: scale(0.95);
}

.whatsapp-button svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.whatsapp-button:hover svg {
    transform: rotate(15deg);
}

/* Pulse animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-button.pulse {
    animation: pulse 2s infinite;
}

/* Modal Styles */
.whatsapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.whatsapp-modal.show {
    opacity: 1;
    visibility: visible;
}

.whatsapp-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.whatsapp-modal.show .whatsapp-modal-content {
    transform: scale(1);
}

.whatsapp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.whatsapp-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.whatsapp-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.whatsapp-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Form Styles */
#whatsapp-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #25D366;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.whatsapp-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #25D366;
}

.whatsapp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-submit:active {
    transform: translateY(0);
}

.whatsapp-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.whatsapp-submit.loading {
    position: relative;
    color: transparent;
}

.whatsapp-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success message */
.whatsapp-success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    font-size: 14px;
    text-align: center;
}

/* Error message */
.whatsapp-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-widget.bottom-right,
    .whatsapp-widget.bottom-left {
        bottom: 15px;
        right: 15px;
        left: auto;
    }
    
    .whatsapp-widget.bottom-left {
        right: auto;
        left: 15px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-button svg {
        width: 24px;
        height: 24px;
    }
    
    .whatsapp-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .whatsapp-modal-header {
        padding: 15px 15px 0 15px;
    }
    
    #whatsapp-form {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .whatsapp-widget.bottom-right,
    .whatsapp-widget.bottom-left {
        bottom: 10px;
        right: 10px;
        left: auto;
    }
    
    .whatsapp-widget.bottom-left {
        right: auto;
        left: 10px;
    }
    
    .whatsapp-button {
        width: 45px;
        height: 45px;
    }
    
    .whatsapp-button svg {
        width: 20px;
        height: 20px;
    }
}
