/* WhatsApp Contact Button Frontend Styles */
#whatsapp-contact-button {
    position: fixed;
    z-index: 999999;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Position Classes */
.whatsapp-button-bottom-right {
    bottom: 20px;
    right: 20px;
}

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

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

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

/* Size Classes */
.whatsapp-button-small .whatsapp-button-content {
    width: 50px;
    height: 50px;
}

.whatsapp-button-small svg {
    width: 20px;
    height: 20px;
}

.whatsapp-button-medium .whatsapp-button-content {
    width: 60px;
    height: 60px;
}

.whatsapp-button-medium svg {
    width: 24px;
    height: 24px;
}

.whatsapp-button-large .whatsapp-button-content {
    width: 70px;
    height: 70px;
}

.whatsapp-button-large svg {
    width: 28px;
    height: 28px;
}

/* Button Content */
.whatsapp-button-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    border-radius: 50%;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Icon + Text Display Style */
.whatsapp-button-icon_text .whatsapp-button-content {
    border-radius: 30px;
    padding: 0 20px 0 15px;
    min-width: auto;
    width: auto;
    height: auto;
    gap: 10px;
}

.whatsapp-button-icon_text.whatsapp-button-small .whatsapp-button-content {
    padding: 8px 15px 8px 12px;
    gap: 8px;
}

.whatsapp-button-icon_text.whatsapp-button-medium .whatsapp-button-content {
    padding: 12px 20px 12px 15px;
    gap: 10px;
}

.whatsapp-button-icon_text.whatsapp-button-large .whatsapp-button-content {
    padding: 15px 25px 15px 18px;
    gap: 12px;
}

.whatsapp-button-content:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

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

/* Visible Text for Icon+Text Style */
.whatsapp-button-visible-text {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: white;
}

.whatsapp-button-icon_text.whatsapp-button-small .whatsapp-button-visible-text {
    font-size: 12px;
}

.whatsapp-button-icon_text.whatsapp-button-large .whatsapp-button-visible-text {
    font-size: 16px;
}

/* Tooltip Text (for icon-only mode) */
.whatsapp-button-text {
    position: absolute;
    background-color: #303030;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

/* Hide tooltip for icon+text style since text is already visible */
.whatsapp-button-icon_text .whatsapp-button-text {
    display: none;
}

/* Tooltip Positioning */
.whatsapp-button-bottom-right .whatsapp-button-text,
.whatsapp-button-top-right .whatsapp-button-text {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}

.whatsapp-button-bottom-left .whatsapp-button-text,
.whatsapp-button-top-left .whatsapp-button-text {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
}

/* Tooltip Arrow */
.whatsapp-button-text::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
}

.whatsapp-button-bottom-right .whatsapp-button-text::after,
.whatsapp-button-top-right .whatsapp-button-text::after {
    left: 100%;
    border-left-color: #303030;
}

.whatsapp-button-bottom-left .whatsapp-button-text::after,
.whatsapp-button-top-left .whatsapp-button-text::after {
    right: 100%;
    border-right-color: #303030;
}

/* Show tooltip on hover */
#whatsapp-contact-button:hover .whatsapp-button-text {
    opacity: 1;
    visibility: visible;
}

/* Pulse Animation */
@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .whatsapp-button-bottom-right,
    .whatsapp-button-top-right {
        right: 15px;
    }
    
    .whatsapp-button-bottom-left,
    .whatsapp-button-top-left {
        left: 15px;
    }
    
    .whatsapp-button-bottom-right,
    .whatsapp-button-bottom-left {
        bottom: 15px;
    }
    
    .whatsapp-button-top-right,
    .whatsapp-button-top-left {
        top: 15px;
    }
    
    /* Hide tooltip on mobile for icon-only mode */
    .whatsapp-button-icon_only .whatsapp-button-text {
        display: none;
    }
    
    /* Adjust icon+text style for mobile */
    .whatsapp-button-icon_text .whatsapp-button-visible-text {
        font-size: 12px;
    }
    
    .whatsapp-button-icon_text.whatsapp-button-large .whatsapp-button-visible-text {
        font-size: 14px;
    }
    
    .whatsapp-button-icon_text.whatsapp-button-small .whatsapp-button-content {
        padding: 6px 12px 6px 10px;
        gap: 6px;
    }
    
    .whatsapp-button-icon_text.whatsapp-button-medium .whatsapp-button-content {
        padding: 8px 15px 8px 12px;
        gap: 8px;
    }
    
    .whatsapp-button-icon_text.whatsapp-button-large .whatsapp-button-content {
        padding: 10px 18px 10px 15px;
        gap: 10px;
    }
}

/* Print Media - Hide button when printing */
@media print {
    #whatsapp-contact-button {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .whatsapp-button-content {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #whatsapp-contact-button,
    .whatsapp-button-content,
    .whatsapp-button-text {
        transition: none;
    }
    
    .whatsapp-button-content.pulse {
        animation: none;
    }
    
    .whatsapp-button-content:hover {
        transform: none;
    }
}
