/* Interactive Cursor - Frontend Styles */

/* Hide default cursor when enabled */
html.ic-hide-cursor,
html.ic-hide-cursor *,
body.ic-hide-cursor,
body.ic-hide-cursor * {
    cursor: none !important;
}

.ic-hide-cursor,
.ic-hide-cursor * {
    cursor: none !important;
}

/* Main cursor container */
.ic-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
    will-change: transform, left, top;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

/* Cursor image */
.ic-cursor-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* Circle style */
.ic-cursor-circle {
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.ic-cursor-circle .ic-cursor-image {
    border-radius: 50%;
}

/* Square style */
.ic-cursor-square {
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 0, 0, 0.3);
}

/* Image only style */
.ic-cursor-image-only {
    background: transparent;
    border: none;
}

/* Dot with ring style */
.ic-cursor-dot-ring {
    width: 8px !important;
    height: 8px !important;
    background: #000;
    border-radius: 50%;
    border: none;
}

.ic-cursor-dot-ring .ic-cursor-image {
    display: none;
}

.ic-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999998;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    will-change: transform, left, top;
    opacity: 0;
}

/* Trail effect */
.ic-cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999997;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    will-change: transform, left, top;
}

.ic-cursor-trail.ic-visible {
    opacity: 0.3;
}

/* Hover state */
.ic-cursor.ic-hover {
    transform: translate(-50%, -50%) scale(var(--ic-hover-scale, 1.5));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
}

.ic-cursor-ring.ic-hover {
    transform: translate(-50%, -50%) scale(var(--ic-hover-scale, 1.5));
    border-color: rgba(0, 0, 0, 0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), width 0.2s ease, height 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

/* Click state */
.ic-cursor.ic-click {
    transform: translate(-50%, -50%) scale(0.9);
    transition: transform 0.1s ease-out, opacity 0.2s ease;
}

.ic-cursor-ring.ic-click {
    transform: translate(-50%, -50%) scale(0.9);
    transition: transform 0.1s ease-out, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}

/* Visible state (when cursor is ready) */
.ic-cursor.ic-visible {
    opacity: 1;
}

.ic-cursor-ring.ic-visible {
    opacity: 1;
}

/* Hidden state (when cursor leaves window) */
.ic-cursor.ic-hidden,
.ic-cursor-ring.ic-hidden,
.ic-cursor-trail.ic-hidden {
    opacity: 0;
}

/* Blend modes */
.ic-blend-normal {
    mix-blend-mode: normal;
}

.ic-blend-difference {
    mix-blend-mode: difference;
}

.ic-blend-exclusion {
    mix-blend-mode: exclusion;
}

.ic-blend-multiply {
    mix-blend-mode: multiply;
}

.ic-blend-screen {
    mix-blend-mode: screen;
}

/* Text cursor state */
.ic-cursor.ic-text {
    transform: translate(-50%, -50%) scaleX(0.5);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Loading state */
.ic-cursor.ic-loading {
    animation: ic-pulse 1s ease-in-out infinite;
}

@keyframes ic-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.7;
    }
}

/* Magnetic effect for interactive elements */
.ic-magnetic {
    transition: transform 0.3s ease;
}

/* Responsive - disable on touch devices */
@media (hover: none) and (pointer: coarse) {
    .ic-cursor,
    .ic-cursor-ring,
    .ic-cursor-trail {
        display: none !important;
    }
    
    .ic-hide-cursor,
    .ic-hide-cursor * {
        cursor: auto !important;
    }
}
