/*!
 * Enhanced Conditional WhatsApp Button Styles
 * Version: 2.4
 */

/* WhatsApp Button Base Styles */
.whatsapp-button-container {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Minimal Button Style */
.whatsapp-button-minimal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.2);
}

.whatsapp-button-minimal:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    color: white;
}

.whatsapp-button-minimal:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(37, 211, 102, 0.2);
}

/* Full Button Style */
.whatsapp-button-full-container {
    margin: 10px 0;
}

.whatsapp-button-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: #25D366;
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    min-height: 44px; /* Touch-friendly */
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.25);
}

.whatsapp-button-full:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    color: white;
}

.whatsapp-button-full:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3);
}

/* Fallback Button Style */
.whatsapp-button-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: #25D366;
    color: white;
    padding: 12px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-height: 44px;
}

.whatsapp-button-fallback:hover {
    background: #128C7E;
    color: white;
    transform: translateY(-1px);
}

/* WhatsApp Icon */
.whatsapp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.whatsapp-icon svg {
    width: 100%;
    height: 100%;
}

/* Button Text */
.button-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading State */
.whatsapp-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
    opacity: 0.8;
}

/* Screen Reader Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
.whatsapp-button-minimal:focus,
.whatsapp-button-full:focus,
.whatsapp-button-fallback:focus {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}

.whatsapp-button-minimal:focus:not(:focus-visible),
.whatsapp-button-full:focus:not(:focus-visible),
.whatsapp-button-fallback:focus:not(:focus-visible) {
    outline: none;
}

/* Container Styles */
.whatsapp-btn-container {
    width: 100%;
}

.whatsapp-minimal-container {
    display: inline-block;
    margin: 5px 0;
}

/* CTA Footer Styles */
.whatsapp-cta-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    margin-top: 15px;
    border-radius: 0 0 8px 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-button-minimal {
        padding: 12px 16px;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .whatsapp-button-full {
        padding: 16px 20px;
        font-size: 1.1rem;
    }
    
    .whatsapp-button-fallback {
        padding: 14px 18px;
        font-size: 1.05rem;
    }
    
    .whatsapp-button-container {
        width: 100%;
    }
    
    .whatsapp-button-minimal {
        width: 100%;
        justify-content: center;
    }
    
    .whatsapp-cta-footer {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .whatsapp-button-minimal {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
    
    .whatsapp-button-full {
        font-size: 1rem;
        padding: 14px 16px;
    }
    
    .whatsapp-button-fallback {
        font-size: 0.95rem;
        padding: 12px 16px;
    }
    
    .whatsapp-cta-footer {
        padding: 10px 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .whatsapp-button-minimal,
    .whatsapp-button-full,
    .whatsapp-button-fallback {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-button-minimal,
    .whatsapp-button-full,
    .whatsapp-button-fallback {
        transition: none;
    }
    
    .whatsapp-button-minimal:hover,
    .whatsapp-button-full:hover,
    .whatsapp-button-fallback:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .whatsapp-cta-footer {
        background: #2d2d2d;
        border-top-color: #404040;
    }
}

/* Print styles */
@media print {
    .whatsapp-button-minimal,
    .whatsapp-button-full,
    .whatsapp-button-fallback {
        display: none !important;
    }
}