/* WhatsApp and Contact Widget Styles */
.widgets-container {
    position: fixed;
    z-index: 1000;
}

/* Position Classes */
.widgets-top-right {
    top: 20px;
    right: 20px;
}

.widgets-top-left {
    top: 20px;
    left: 20px;
}

.widgets-bottom-right {
    bottom: 20px;
    right: 20px;
}

.widgets-bottom-left {
    bottom: 20px;
    left: 20px;
}

.widgets-center-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.widgets-center-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

/* WhatsApp Widget */
.whatsapp-widget {
    position: relative;
    margin-bottom: 15px;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
    text-decoration: none;
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.whatsapp-button:hover::before {
    width: 100px;
    height: 100px;
}

/* WhatsApp Popup */
.whatsapp-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.whatsapp-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.whatsapp-popup-header {
    background: #25D366;
    color: white;
    padding: 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-popup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #25D366;
}

.whatsapp-popup-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.whatsapp-popup-info p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.whatsapp-popup-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.whatsapp-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.whatsapp-popup-body {
    padding: 20px;
}

.whatsapp-popup-message {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.whatsapp-popup-input {
    display: flex;
    gap: 10px;
}

.whatsapp-popup-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.whatsapp-popup-input input:focus {
    border-color: #25D366;
}

.whatsapp-popup-input button {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.whatsapp-popup-input button:hover {
    background: #128C7E;
}

/* Contact Widget */
.contact-widget {
    position: relative;
}

.contact-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
}

.contact-button:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
    text-decoration: none;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.contact-button:hover::before {
    width: 100px;
    height: 100px;
}

/* Contact Popup */
.contact-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.contact-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.contact-popup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-popup-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #667eea;
}

.contact-popup-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.contact-popup-info p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.contact-popup-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.contact-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.contact-popup-body {
    padding: 20px;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.contact-option:hover {
    background: #e9ecef;
    transform: translateX(5px);
    text-decoration: none;
    color: #333;
}

.contact-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.contact-option-icon.phone {
    background: #28a745;
}

.contact-option-icon.email {
    background: #dc3545;
}

.contact-option-icon.map {
    background: #ffc107;
    color: #333;
}

.contact-option-content h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.contact-option-content p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* Position Control Panel */
.position-control {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    z-index: 1001;
    max-width: 200px;
}

.position-control h5 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.position-control select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 10px;
    outline: none;
}

.position-control select:focus {
    border-color: #667eea;
}

.position-control button {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.position-control button:hover {
    opacity: 0.9;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .whatsapp-popup,
    .contact-popup {
        width: 280px;
        right: -10px;
    }
    
    .whatsapp-button,
    .contact-button {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .position-control {
        top: auto;
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .whatsapp-popup,
    .contact-popup {
        width: 260px;
    }
    
    .whatsapp-button,
    .contact-button {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Animation for widgets */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-button {
    animation: pulse 2s infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.contact-button {
    animation: rotate 4s linear infinite;
}

.contact-button:hover {
    animation: none;
}
