/* ===== PULSANTI ULTRA-MODERNI E INTERATTIVI ===== */

/* Pulsanti Base Ultra-Moderni */
.btn-ultra-modern {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #40E0D0 0%, #36c9b0 100%);
    color: white;
    box-shadow: 
        0 8px 25px rgba(64, 224, 208, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(0);
    user-select: none;
}

.btn-ultra-modern:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(64, 224, 208, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ultra-modern:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

/* Accessibilità: stati focus evidenti */
.btn-ultra-modern:focus-visible {
    outline: 3px solid #40E0D0;
    outline-offset: 2px;
    box-shadow:
        0 0 0 3px rgba(64, 224, 208, 0.3),
        0 8px 25px rgba(64, 224, 208, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Varianti di Colore */
.btn-ultra-modern.primary {
    background: linear-gradient(135deg, #40E0D0 0%, #36c9b0 100%);
    box-shadow: 
        0 8px 25px rgba(64, 224, 208, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-ultra-modern.primary:hover {
    box-shadow: 
        0 15px 35px rgba(64, 224, 208, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ultra-modern.secondary {
    background: linear-gradient(135deg, #40E0D0 0%, #36c9b0 100%);
}

.btn-ultra-modern.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 
        0 8px 25px rgba(255, 107, 107, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-ultra-modern.danger:hover {
    box-shadow: 
        0 15px 35px rgba(255, 107, 107, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-ultra-modern.outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-ultra-modern.outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Effetti Speciali */
.btn-ultra-modern.shimmer {
    position: relative;
    overflow: hidden;
}

.btn-ultra-modern.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.btn-ultra-modern.shimmer:hover::before {
    left: 100%;
}

.btn-ultra-modern.magnetic {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ultra-modern.magnetic:hover {
    transform: translateY(-3px) scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .btn-ultra-modern,
    .btn-ultra-modern:hover,
    .btn-ultra-modern:active {
        transition: none;
        transform: none;
        animation: none;
    }
}

/* Pulsanti con Icone */
.btn-ultra-modern .btn-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-ultra-modern:hover .btn-icon {
    transform: scale(1.2) rotate(5deg);
}

/* Pulsanti di Dimensione */
.btn-ultra-modern.small {
    padding: 10px 20px;
    font-size: 0.85rem;
    border-radius: 12px;
}

.btn-ultra-modern.large {
    padding: 18px 36px;
    font-size: 1.1rem;
    border-radius: 20px;
}

/* Pulsanti Rounded */
.btn-ultra-modern.rounded {
    border-radius: 50px;
}

/* Pulsanti con Glow */
.btn-ultra-modern.glow {
    box-shadow: 
        0 8px 25px rgba(64, 224, 208, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 20px rgba(64, 224, 208, 0.3);
}

.btn-ultra-modern.glow:hover {
    box-shadow: 
        0 15px 35px rgba(64, 224, 208, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 30px rgba(64, 224, 208, 0.5);
}

/* Pulsanti Glassmorphism */
.btn-ultra-modern.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-ultra-modern.glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Pulsanti Floating */
.btn-ultra-modern.floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    z-index: 1000;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-ultra-modern.floating:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Pulsanti con Loading */
.btn-ultra-modern.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-ultra-modern.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulsanti con Ripple Effect */
.btn-ultra-modern.ripple {
    position: relative;
    overflow: hidden;
}

.btn-ultra-modern.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ultra-modern.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Pulsanti con Pulse Animation */
.btn-ultra-modern.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 
            0 8px 25px rgba(64, 224, 208, 0.4),
            0 0 0 0 rgba(64, 224, 208, 0.7);
    }
    70% {
        box-shadow: 
            0 8px 25px rgba(64, 224, 208, 0.4),
            0 0 0 10px rgba(64, 224, 208, 0);
    }
    100% {
        box-shadow: 
            0 8px 25px rgba(64, 224, 208, 0.4),
            0 0 0 0 rgba(64, 224, 208, 0);
    }
}

/* Pulsanti con Hover 3D */
.btn-ultra-modern.hover-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.btn-ultra-modern.hover-3d:hover {
    transform: translateY(-3px) rotateX(10deg) rotateY(10deg);
}

/* Pulsanti con Text Glow */
.btn-ultra-modern.text-glow {
    text-shadow: 0 0 10px currentColor;
}

.btn-ultra-modern.text-glow:hover {
    text-shadow: 0 0 20px currentColor;
}

/* Pulsanti Responsive */
@media (max-width: 768px) {
    .btn-ultra-modern {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .btn-ultra-modern.small {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .btn-ultra-modern.large {
        padding: 16px 32px;
        font-size: 1rem;
    }
    
    .btn-ultra-modern.floating {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* Pulsanti Disabled */
.btn-ultra-modern:disabled,
.btn-ultra-modern.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
}

/* Gruppi di Pulsanti */
.btn-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-group.vertical {
    flex-direction: column;
    align-items: stretch;
}

.btn-group .btn-ultra-modern {
    flex: 1;
}

/* Pulsanti con Badge */
.btn-ultra-modern.badge {
    position: relative;
}

.btn-ultra-modern.badge::after {
    content: attr(data-badge);
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* Pulsanti con Progress */
.btn-ultra-modern.progress {
    position: relative;
    overflow: hidden;
}

.btn-ultra-modern.progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s ease;
    width: var(--progress, 0%);
}

/* Pulsanti con Checkmark */
.btn-ultra-modern.success {
    background: linear-gradient(135deg, #40E0D0 0%, #36c9b0 100%);
}

.btn-ultra-modern.success::after {
    content: '✓';
    margin-left: 8px;
    font-weight: bold;
    animation: checkmark 0.3s ease;
}

@keyframes checkmark {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
