/**
 * Copy Button Elementor Widget Styles
 * Provides styling for the copy button widget
 */

/* Main wrapper */
.copy-btn-elementor-wrapper {
    display: inline-block;
    width: 100%;
}

/* Button base styles */
.copy-btn-elementor-button {
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Button hover state */
.copy-btn-elementor-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Button active state */
.copy-btn-elementor-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Button disabled state */
.copy-btn-elementor-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Success state */
.copy-btn-elementor-button.copy-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: #ffffff !important;
}

.copy-btn-elementor-button.copy-success::before {
    content: "✓ ";
    font-weight: bold;
}

/* Error state */
.copy-btn-elementor-button.copy-error {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.copy-btn-elementor-button.copy-error::before {
    content: "✗ ";
    font-weight: bold;
}

/* Copied animation */
.copy-btn-elementor-button.copy-btn-copied {
    animation: copyPulse 0.6s ease-in-out;
}

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

/* Button text element */
.copy-btn-elementor-button .button-text {
    display: inline-block;
    vertical-align: middle;
}

/* Icon support (if icons are added) */
.copy-btn-elementor-button .button-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.copy-btn-elementor-button .button-icon:last-child {
    margin-right: 0;
    margin-left: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .copy-btn-elementor-button {
        width: 100%;
        display: block;
    }
    
    .copy-btn-elementor-wrapper {
        text-align: center;
    }
}

/* Focus styles for accessibility */
.copy-btn-elementor-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .copy-btn-elementor-button {
        border: 2px solid currentColor;
    }
    
    .copy-btn-elementor-button.copy-success {
        border-color: #ffffff;
    }
    
    .copy-btn-elementor-button.copy-error {
        border-color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .copy-btn-elementor-button {
        transition: none;
    }
    
    .copy-btn-elementor-button:hover {
        transform: none;
    }
    
    .copy-btn-elementor-button.copy-btn-copied {
        animation: none;
    }
}

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