/**
 * Frontend Styles for CepiApps Boton UTM Plugin
 *
 * All styles are scoped under .cepiapps-utm-widgets to prevent conflicts
 */

/* UTM Button Styles */
.cepiapps-utm-widgets .cepiapps-utm-button {
    display: inline-block;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    line-height: 1.5;
    user-select: none;
    background-color: #ff6b35;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
}

.cepiapps-utm-widgets .cepiapps-utm-button:hover,
.elementor-widget-container .cepiapps-utm-button:hover {
    background-color: #e55a2b;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px) !important;
}

.cepiapps-utm-widgets .cepiapps-utm-button:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.cepiapps-utm-widgets .cepiapps-utm-button:active,
.elementor-widget-container .cepiapps-utm-button:active {
    transform: translateY(0) !important;
}

.cepiapps-utm-widgets .cepiapps-utm-button:visited {
    color: #ffffff;
}

/* Button Variants */
.cepiapps-utm-widgets .cepiapps-utm-button.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-block {
    display: block;
    width: 100%;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-outline {
    background-color: transparent;
    color: #ff6b35;
    border-color: #ff6b35;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-outline:hover {
    background-color: #ff6b35;
    color: #ffffff;
}

/* Color Variants */
.cepiapps-utm-widgets .cepiapps-utm-button.btn-primary {
    background-color: #007cba;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-primary:hover {
    background-color: #005a87;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-success {
    background-color: #28a745;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-success:hover {
    background-color: #218838;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-warning:hover {
    background-color: #e0a800;
    color: #212529;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-danger {
    background-color: #dc3545;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-danger:hover {
    background-color: #c82333;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-dark {
    background-color: #343a40;
}

.cepiapps-utm-widgets .cepiapps-utm-button.btn-dark:hover {
    background-color: #23272b;
}

/* UTM Debug Info Styles */
.cepiapps-utm-widgets .cepiapps-utm-debug {
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

.cepiapps-utm-widgets .cepiapps-utm-debug h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
}

.cepiapps-utm-widgets .cepiapps-utm-debug p {
    margin: 5px 0;
    color: #333;
}

.cepiapps-utm-widgets .cepiapps-utm-debug ul {
    margin: 10px 0;
    padding-left: 20px;
}

.cepiapps-utm-widgets .cepiapps-utm-debug li {
    margin: 3px 0;
    color: #333;
}

.cepiapps-utm-widgets .cepiapps-utm-debug strong {
    color: #0073aa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cepiapps-utm-widgets .cepiapps-utm-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-button.btn-large {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-button.btn-small {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cepiapps-utm-widgets .cepiapps-utm-button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-button.btn-block {
        margin-bottom: 10px;
    }
}

/* Animation Classes */
.cepiapps-utm-widgets .cepiapps-utm-button.animate-pulse {
    animation: utmPulse 2s infinite;
}

@keyframes utmPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

.cepiapps-utm-widgets .cepiapps-utm-button.animate-bounce:hover {
    animation: utmBounce 0.6s;
}

@keyframes utmBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* Loading State */
.cepiapps-utm-widgets .cepiapps-utm-button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.cepiapps-utm-widgets .cepiapps-utm-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: utmSpin 1s linear infinite;
}

@keyframes utmSpin {
    to { transform: rotate(360deg); }
}

/* Icon Support */
.cepiapps-utm-widgets .cepiapps-utm-button .icon {
    margin-right: 8px;
    font-size: 1.1em;
}

.cepiapps-utm-widgets .cepiapps-utm-button .icon-right {
    margin-left: 8px;
    margin-right: 0;
}

/* Accessibility */
.cepiapps-utm-widgets .cepiapps-utm-button:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cepiapps-utm-widgets .cepiapps-utm-button {
        border: 2px solid;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cepiapps-utm-widgets .cepiapps-utm-button {
        transition: none;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-button:hover {
        transform: none;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-button.animate-pulse,
    .cepiapps-utm-widgets .cepiapps-utm-button.animate-bounce:hover {
        animation: none;
    }
}

/* UTM Display Widget Styles */
.cepiapps-utm-widgets .cepiapps-utm-display {
    display: inline-block;
    font-family: inherit;
    line-height: 1.5;
}

.cepiapps-utm-widgets .cepiapps-utm-value {
    font-weight: 600;
    display: inline;
}

.cepiapps-utm-widgets .cepiapps-utm-before,
.cepiapps-utm-widgets .cepiapps-utm-after {
    display: inline;
}

/* UTM Display responsive styles */
@media (max-width: 768px) {
    .cepiapps-utm-widgets .cepiapps-utm-display {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cepiapps-utm-widgets .cepiapps-utm-display {
        font-size: 13px;
    }
}

/* UTM Display print styles */
@media print {
    .cepiapps-utm-widgets .cepiapps-utm-display {
        color: #000 !important;
        background: transparent !important;
    }
}

/* Print Styles */
@media print {
    .cepiapps-utm-widgets .cepiapps-utm-button {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-button::after {
        content: " (" attr(href) ")";
        font-size: 12px;
        color: #666;
    }
}

/* License Notice Styles */
.cepiapps-utm-widgets .cepiapps-utm-license-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 10px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: inherit;
    line-height: 1.5;
}

.cepiapps-utm-widgets .cepiapps-utm-license-notice h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.cepiapps-utm-widgets .cepiapps-utm-license-notice p {
    margin: 0 0 15px 0;
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.4;
}

.cepiapps-utm-widgets .cepiapps-utm-license-notice a {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
}

.cepiapps-utm-widgets .cepiapps-utm-license-notice a:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cepiapps-utm-widgets .cepiapps-utm-license-notice a:focus {
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

.cepiapps-utm-widgets .cepiapps-utm-license-notice .license-icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

/* Responsive License Notice */
@media (max-width: 768px) {
    .cepiapps-utm-widgets .cepiapps-utm-license-notice {
        padding: 15px;
        margin: 8px 0;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-license-notice h3 {
        font-size: 16px;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-license-notice p {
        font-size: 13px;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-license-notice a {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .cepiapps-utm-widgets .cepiapps-utm-license-notice {
        padding: 12px;
        margin: 5px 0;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-license-notice .license-icon {
        font-size: 20px;
        margin-bottom: 8px;
    }
}

/* Print styles for license notice */
@media print {
    .cepiapps-utm-widgets .cepiapps-utm-license-notice {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-license-notice a {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
}

/* High contrast mode for license notice */
@media (prefers-contrast: high) {
    .cepiapps-utm-widgets .cepiapps-utm-license-notice {
        border: 2px solid white;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-license-notice a {
        border: 2px solid white;
    }
}

/* Reduced motion for license notice */
@media (prefers-reduced-motion: reduce) {
    .cepiapps-utm-widgets .cepiapps-utm-license-notice a {
        transition: none;
    }
    
    .cepiapps-utm-widgets .cepiapps-utm-license-notice a:hover {
        transform: none;
    }
}