/**
 * WhatsApp Button Plugin - Styles
 * @package     Joomla.Plugin
 * @subpackage  System.whatsapp_button
 */

.whatsapp-button-fixed {
    position: fixed;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: #25D366;
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.whatsapp-button-fixed:hover {
    background-color: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: #ffffff;
    text-decoration: none;
}

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

/* Position variants */
.whatsapp-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

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

/* Size variants */
.whatsapp-size-small {
    padding: 8px 16px;
    font-size: 13px;
}

.whatsapp-size-small .whatsapp-icon {
    width: 20px;
    height: 20px;
}

.whatsapp-size-medium {
    padding: 12px 20px;
    font-size: 15px;
}

.whatsapp-size-medium .whatsapp-icon {
    width: 24px;
    height: 24px;
}

.whatsapp-size-large {
    padding: 16px 24px;
    font-size: 17px;
}

.whatsapp-size-large .whatsapp-icon {
    width: 28px;
    height: 28px;
}

/* Icon styling */
.whatsapp-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: currentColor;
}

.whatsapp-text {
    display: inline-block;
}

/* Visibility controls */
.whatsapp-hide-desktop {
    display: none !important;
}

.whatsapp-hide-mobile {
    display: inline-flex !important;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-button-fixed {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .whatsapp-position-bottom-right {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-position-bottom-left {
        bottom: 15px;
        left: 15px;
    }
    
    .whatsapp-hide-mobile {
        display: none !important;
    }
    
    .whatsapp-hide-desktop {
        display: inline-flex !important;
    }
    
    /* Hide text on very small screens, show only icon */
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-button-fixed {
        padding: 14px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
    }
    
    .whatsapp-size-small {
        width: 48px;
        height: 48px;
        padding: 12px;
    }
    
    .whatsapp-size-large {
        width: 64px;
        height: 64px;
        padding: 18px;
    }
}

@media (min-width: 769px) {
    /* Show text on desktop */
    .whatsapp-text {
        display: inline-block;
    }
}

/* Animation on load */
@keyframes whatsappPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.whatsapp-button-fixed {
    animation: whatsappPulse 2s ease-in-out infinite;
}

.whatsapp-button-fixed:hover {
    animation: none;
}

/* Accessibility */
.whatsapp-button-fixed:focus {
    outline: 3px solid rgba(37, 211, 102, 0.5);
    outline-offset: 2px;
}

.whatsapp-button-fixed:focus:not(:focus-visible) {
    outline: none;
}

/* Print styles */
@media print {
    .whatsapp-button-fixed {
        display: none !important;
    }
}
