/**
 * Frontend styles for WhatsApp buttons
 */

.dw-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.dw-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.dw-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dw-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Button Sizes */
.dw-small {
    padding: 8px 16px;
    font-size: 12px;
    gap: 6px;
}

.dw-medium {
    padding: 12px 20px;
    font-size: 14px;
    gap: 8px;
}

.dw-large {
    padding: 16px 24px;
    font-size: 16px;
    gap: 10px;
}

/* Button Styles */
.dw-modern {
    border-radius: 8px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.dw-classic {
    border-radius: 4px;
    background: #25D366;
    border: 2px solid #128C7E;
}

.dw-minimal {
    border-radius: 0;
    background: #25D366;
    box-shadow: none;
    border: 1px solid #128C7E;
}

.dw-rounded {
    border-radius: 25px;
    background: #25D366;
}

.dw-square {
    border-radius: 0;
    background: #25D366;
    border: 2px solid #128C7E;
}

/* Icon */
.dw-icon {
    font-size: 1.2em;
    line-height: 1;
}

.dw-small .dw-icon {
    font-size: 1em;
}

.dw-large .dw-icon {
    font-size: 1.4em;
}

/* Text */
.dw-text {
    white-space: nowrap;
}

/* Preview Mode */
.dw-preview {
    pointer-events: none;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dw-button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .dw-large {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .dw-small {
        padding: 8px 12px;
        font-size: 11px;
    }
}

/* Animation for click tracking */
.dw-button.dw-clicked {
    animation: dw-pulse 0.6s ease-in-out;
}

@keyframes dw-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .dw-button {
        transition: none;
    }
    
    .dw-button:hover {
        transform: none;
    }
    
    .dw-button.dw-clicked {
        animation: none;
    }
}

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

/* Print styles */
@media print {
    .dw-button {
        display: none;
    }
}

/* Dynamic link indicator */
.dw-dynamic-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 10px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: dw-pulse 2s infinite;
}

/* Hover effect for dynamic links */
a[data-dw-dynamic="true"]:hover .dw-dynamic-indicator {
    background: #128C7E;
    transform: scale(1.1);
}
