/* ===========================
   CUSTOM CURSOR EFFECT PLUGIN
   Version: 1.0.0
   =========================== */

/* Ocultar cursor nativo */
body.custom-cursor-active,
body.custom-cursor-active * {
    cursor: none !important;
}

/* Container del cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999999;
}

/* Punto interior */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cce-dot-size, 8px);
    height: var(--cce-dot-size, 8px);
    background-color: var(--cce-dot-color, #ffffff);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background-color 0.3s ease,
                opacity 0.3s ease;
    z-index: 1000001;
    mix-blend-mode: difference;
    will-change: transform;
    backface-visibility: hidden;
    opacity: 0;
}

/* Círculo exterior con lag */
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--cce-outline-size, 40px);
    height: var(--cce-outline-size, 40px);
    border: 2px solid var(--cce-outline-color, #ffffff);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.3s ease,
                opacity 0.3s ease;
    z-index: 1000000;
    mix-blend-mode: difference;
    opacity: 0;
    will-change: transform;
    backface-visibility: hidden;
}

/* Estados activos */
.cursor-dot.active {
    opacity: 1 !important;
}

.cursor-outline.active {
    opacity: 0.8 !important;
}

/* Estado hover sobre elementos interactivos */
.cursor-dot.hover {
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
}

.cursor-outline.hover {
    width: var(--cce-hover-size, 70px) !important;
    height: var(--cce-hover-size, 70px) !important;
    border-width: 2px;
    opacity: 0.5 !important;
}

/* Estado click */
.cursor-outline.clicking {
    width: calc(var(--cce-outline-size, 40px) * 0.75) !important;
    height: calc(var(--cce-outline-size, 40px) * 0.75) !important;
    opacity: 1 !important;
}

/* Ocultar en dispositivos móviles */
@media (max-width: 768px), (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
    
    body.custom-cursor-active,
    body.custom-cursor-active * {
        cursor: auto !important;
    }
}

/* Ocultar cuando el cursor sale de la ventana */
.custom-cursor.hidden .cursor-dot,
.custom-cursor.hidden .cursor-outline {
    opacity: 0 !important;
}

/* Micro-interacciones en elementos (opcional) */
body.custom-cursor-active a:hover,
body.custom-cursor-active button:hover {
    transform: scale(0.98);
    transition: transform 0.2s ease;
}

/* Performance optimizations */
.cursor-dot,
.cursor-outline {
    contain: layout style paint;
    content-visibility: auto;
}