/* ============================================================
   KUZNYA EFFECTS - Button Effects
   pulse / shine / glow / ripple
   ============================================================ */

/* ---- Base: buttons with effects ---- */
[data-btn-effect] {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* ============================================================
   1. PULSE
   ============================================================ */
[data-btn-effect="pulse"] {
    animation: kz-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes kz-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--c-primary-rgb, 37, 99, 235), 0.5);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 0 12px rgba(var(--c-primary-rgb, 37, 99, 235), 0);
    }
}

[data-btn-effect="pulse"]:hover {
    animation-play-state: paused;
}

/* ============================================================
   2. SHINE
   ============================================================ */
[data-btn-effect="shine"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 70%
    );
    transition: left 0.7s ease;
    pointer-events: none;
    z-index: 1;
}

[data-btn-effect="shine"]:hover::before {
    left: 100%;
}

/* Автоматический shine (без hover) */
[data-btn-effect="shine-auto"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 1;
    animation: kz-shine 3s ease-in-out infinite;
}

@keyframes kz-shine {
    0%   { left: -100%; }
    60%  { left: 100%; }
    100% { left: 100%; }
}

/* ============================================================
   3. GLOW
   ============================================================ */
[data-btn-effect="glow"] {
    transition: box-shadow 0.35s ease, transform 0.2s ease;
}

[data-btn-effect="glow"]:hover {
    box-shadow:
        0 0 0 2px rgba(var(--c-primary-rgb, 37, 99, 235), 0.35),
        0 0 20px 4px rgba(var(--c-primary-rgb, 37, 99, 235), 0.55),
        0 0 40px 8px rgba(var(--c-primary-rgb, 37, 99, 235), 0.3);
    transform: translateY(-2px);
}

/* Постоянное мягкое свечение */
[data-btn-effect="glow-auto"] {
    animation: kz-glow 2.5s ease-in-out infinite;
}

@keyframes kz-glow {
    0%, 100% {
        box-shadow: 0 0 8px 0 rgba(var(--c-primary-rgb, 37, 99, 235), 0.35);
    }
    50% {
        box-shadow:
            0 0 16px 4px rgba(var(--c-primary-rgb, 37, 99, 235), 0.6),
            0 0 32px 8px rgba(var(--c-primary-rgb, 37, 99, 235), 0.25);
    }
}

/* ============================================================
   4. RIPPLE (управляется JS)
   ============================================================ */
[data-btn-effect="ripple"] {
    cursor: pointer;
}

.kz-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transform: scale(0);
    animation: kz-ripple-anim 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    pointer-events: none;
    z-index: 2;
}

@keyframes kz-ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================================
   Fallback: reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    [data-btn-effect="pulse"],
    [data-btn-effect="glow-auto"],
    [data-btn-effect="shine-auto"]::before {
        animation: none !important;
    }
    .kz-ripple { display: none !important; }
}