/* ============================================================
   NDMSK Technology — glass-buttons.css
   Liquid Glass Button System
   ============================================================ */

/* ── BASE .glass-btn ─────────────────────────────────────── */
.glass-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 30px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #fff;
    text-decoration: none;
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 999px;
    overflow: hidden;
    /* ripple stays inside */
    isolation: isolate;

    /* Glass base */
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);

    /* Gradient border via box-shadow trick */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14),
        0 4px 24px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);

    transition:
        transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.28s ease,
        background 0.28s ease;
    user-select: none;
    -webkit-user-select: none;
}

/* ── GRADIENT BORDER (pseudo) ───────────────────────────── */
.glass-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.6),
            rgba(6, 182, 212, 0.4),
            rgba(139, 92, 246, 0.5));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

/* ── SHINE SWEEP (pseudo) ────────────────────────────────── */
.glass-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.22) 50%,
            transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 1;
}

/* ── TEXT / ICONS ON TOP ─────────────────────────────────── */
.glass-btn>* {
    position: relative;
    z-index: 2;
}

/* ── HOVER STATE ─────────────────────────────────────────── */
.glass-btn:hover {
    transform: scale(1.06) translateY(-2px);
    background: rgba(255, 255, 255, 0.10);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.45),
        0 8px 40px rgba(99, 102, 241, 0.35),
        0 0 60px rgba(6, 182, 212, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Trigger shine sweep on hover */
.glass-btn:hover::after {
    left: 150%;
}

/* ── ACTIVE STATE ────────────────────────────────────────── */
.glass-btn:active {
    transform: scale(0.97) translateY(0);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.5),
        0 2px 12px rgba(99, 102, 241, 0.3),
        inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ── RIPPLE ──────────────────────────────────────────────── */
.glass-btn .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.25);
    animation: glass-ripple 0.6s linear;
    pointer-events: none;
    z-index: 3;
}

@keyframes glass-ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ── GLOW PULSE ──────────────────────────────────────────── */
@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35), 0 8px 40px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.5), 0 12px 50px rgba(6, 182, 212, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.glass-btn.glow-loop {
    animation: glow-pulse 2.4s ease-in-out infinite;
}

/* ── SIZE VARIANTS ───────────────────────────────────────── */
.glass-btn.btn-sm {
    padding: 9px 20px;
    font-size: 0.85rem;
}

.glass-btn.btn-lg {
    padding: 16px 42px;
    font-size: 1.05rem;
}

/* ── COLOR VARIANTS ──────────────────────────────────────── */
.glass-btn.btn-indigo {
    background: rgba(99, 102, 241, 0.18);
}

.glass-btn.btn-indigo:hover {
    background: rgba(99, 102, 241, 0.28);
}

.glass-btn.btn-cyan {
    background: rgba(6, 182, 212, 0.15);
}

.glass-btn.btn-cyan::before {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.6), rgba(16, 185, 129, 0.5));
}

.glass-btn.btn-cyan:hover {
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.5), 0 8px 40px rgba(6, 182, 212, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.glass-btn.btn-purple {
    background: rgba(139, 92, 246, 0.15);
}

.glass-btn.btn-purple::before {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.6), rgba(236, 72, 153, 0.5));
}

.glass-btn.btn-purple:hover {
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.5), 0 8px 40px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ── ICON BUTTON ─────────────────────────────────────────── */
.glass-btn .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.glass-btn:hover .btn-icon {
    transform: translateX(3px);
}

/* ── DISABLED ────────────────────────────────────────────── */
.glass-btn:disabled,
.glass-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ── MAGNETIC WRAPPER ────────────────────────────────────── */
/* Magnetic movement uses JS — just ensure overflow visible */
.magnetic-wrap {
    display: inline-block;
    overflow: visible;
}