/* ==========================================================================
   İmleç takip ve tıklama animasyonu (site ve panel ortak)
   Renkler --cursor-color / --cursor-color-2 ile temaya göre değişir.
   ========================================================================== */

:root {
    --cursor-color: #4fc4ff;
    --cursor-color-2: #a77dff;
}

.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483000;
    pointer-events: none;
    border-radius: 50%;
    will-change: transform;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    background: var(--cursor-color);
}

.cursor-ring {
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 1.5px solid var(--cursor-color);
    opacity: 0.55;
    transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, opacity 0.25s ease,
                background-color 0.25s ease, border-color 0.25s ease;
}

/* Bağlantı ve düğme üzerinde halka büyür */
.cursor-hover .cursor-ring {
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    opacity: 1;
    background-color: color-mix(in srgb, var(--cursor-color) 14%, transparent);
}

/* Sürüklenebilir alanlarda */
.cursor-drag .cursor-ring {
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
    opacity: 1;
    border-style: dashed;
}

/* Yazı alanlarında gizlenir, yerel imleç kalır */
.cursor-text .cursor-ring,
.cursor-text .cursor-dot { opacity: 0; }

.cursor-pressed .cursor-ring {
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    opacity: 1;
}

.cursor-hidden .cursor-ring,
.cursor-hidden .cursor-dot { opacity: 0; }

/* Özel imleç etkinken yerel ok imlecini gizle, yazı alanlarını koru */
html.cursor-enabled,
html.cursor-enabled a,
html.cursor-enabled button,
html.cursor-enabled label,
html.cursor-enabled [role="button"],
html.cursor-enabled .slider { cursor: none; }
html.cursor-enabled input,
html.cursor-enabled textarea,
html.cursor-enabled select,
html.cursor-enabled [contenteditable="true"] { cursor: auto; }

/* Tıklama patlaması */
.click-ripple,
.click-spark {
    position: fixed;
    z-index: 2147483001;
    pointer-events: none;
    border-radius: 50%;
}

.click-ripple {
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid var(--cursor-color);
}

.click-spark {
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: var(--cursor-color-2);
}

.click-spark:nth-child(even) { background: var(--cursor-color); }

@media (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}
