/* ==========================================================================
   INTERACTIVE MAGIC CURSOR (MATCHING HUBTECH / NASREEN REFERENCE & MOCKUP)
   ========================================================================== */

/* Outer trailing cursor container */
.cb-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    contain: layout style size;
    pointer-events: none;
    will-change: transform;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Outer Ring (Circle border following the cursor with inertia) */
.cb-cursor:before {
    content: "";
    position: absolute;
    top: -19px;
    left: -19px;
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(40, 60, 90, 0.3);
    background: transparent;
    box-sizing: border-box;
    transform: scale(0.5);
    transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1),
                border-color 0.28s ease,
                background-color 0.28s ease,
                opacity 0.25s ease;
}

/* Inner Core Dot (Tracks cursor with instant precision) */
.cb-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000000;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    margin-left: -3px;
    border-radius: 50%;
    background: #ea5501; /* Hubtech Accent Orange / Coral */
    pointer-events: none;
    will-change: transform;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 0 6px rgba(234, 85, 1, 0.4);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

/* Cursor Text Container (For data-cursor-text like 'Drag', 'View', 'Explore') */
.cb-cursor-text {
    position: absolute;
    top: -22px;
    left: -22px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    opacity: 0;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

/* --------------------------------------------------------------------------
   STATE: VISIBLE
   -------------------------------------------------------------------------- */
.cb-cursor.-visible,
.cb-cursor-dot.-visible {
    opacity: 1;
    visibility: visible;
}

.cb-cursor.-visible:before {
    transform: scale(1);
}

/* --------------------------------------------------------------------------
   STATE: ACTIVE (MOUSEDOWN / CLICK)
   -------------------------------------------------------------------------- */
.cb-cursor.-active:before {
    transform: scale(0.82);
    border-color: #ea5501;
    background: rgba(234, 85, 1, 0.08);
}

.cb-cursor-dot.-active {
    transform: scale(1.3) !important;
}

/* --------------------------------------------------------------------------
   STATE: POINTER (HOVER ON LINKS, BUTTONS, CARDS, INPUTS)
   -------------------------------------------------------------------------- */
.cb-cursor.-pointer:before {
    transform: scale(1.42);
    border-color: #0077e6;
    background: rgba(0, 119, 230, 0.07);
}

.cb-cursor.-pointer .cb-cursor-dot,
.cb-cursor-dot.-pointer {
    opacity: 0.25;
    transform: scale(0.6) !important;
}

/* --------------------------------------------------------------------------
   STATE: OPAQUE (HOVER ON HEADINGS & LABELS WITH data-cursor="-opaque")
   -------------------------------------------------------------------------- */
@supports (mix-blend-mode: exclusion) {
    .cb-cursor.-opaque {
        mix-blend-mode: exclusion;
    }
    .cb-cursor.-opaque:before {
        background: #ffffff;
        border-color: transparent;
        transform: scale(1.55);
    }
    .cb-cursor-dot.-opaque {
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   STATE: TEXT BADGE (HOVER ON data-cursor-text)
   -------------------------------------------------------------------------- */
.cb-cursor.-text:before {
    transform: scale(1.85);
    background: #0059c0;
    border-color: #0059c0;
    opacity: 0.95;
    box-shadow: 0 4px 18px rgba(0, 89, 192, 0.35);
}

.cb-cursor.-text .cb-cursor-text {
    opacity: 1;
    transform: scale(1);
}

.cb-cursor-dot.-text {
    opacity: 0;
}

/* --------------------------------------------------------------------------
   STATE: HIDDEN
   -------------------------------------------------------------------------- */
.cb-cursor.-hidden,
.cb-cursor-dot.-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   RESPONSIVE: HIDE COMPLETELY ON MOBILE & TOUCH SCREENS
   -------------------------------------------------------------------------- */
@media (max-width: 860px), (pointer: coarse) {
    .cb-cursor,
    .cb-cursor-dot {
        display: none !important;
    }
}
