/* Global Cursor Override - Highest Priority */
/* This file ensures EVERY element uses custom cursors regardless of specificity */

/* Universal selector with highest priority */
*, *::before, *::after {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

/* Force override ALL possible cursor states */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

/* Interactive elements get pointer cursor */
button, input[type="button"], input[type="submit"], input[type="reset"],
input[type="file"], select, label, summary, [role="button"],
[tabindex]:not([tabindex="-1"]), a, a:link, a:visited, a:hover, a:active,
area, audio[controls], video[controls], .cursor-pointer, [onclick],
[data-clickable], input[type="checkbox"], input[type="radio"] {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* Text inputs keep text cursor appearance but use custom image */
input[type="text"], input[type="password"], input[type="email"],
input[type="search"], input[type="tel"], input[type="url"], 
input[type="number"], textarea, [contenteditable],
[contenteditable="true"] {
    cursor: url('./img/cursor.png'), text !important;
}

/* Special states */
[disabled], .disabled {
    cursor: url('./img/cursor.png'), not-allowed !important;
}

/* Third-party and framework overrides */
.vue-component *, .vue-component *::before, .vue-component *::after,
[class*="vue-"] *, [class*="vue-"] *::before, [class*="vue-"] *::after,
[class*="v-"] *, [class*="v-"] *::before, [class*="v-"] *::after {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

/* jQuery UI overrides */
.ui-widget *, .ui-state-default *, .ui-state-hover *,
.ui-state-active *, .ui-state-focus * {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

.ui-button, .ui-button *, .ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* OS-GUI overrides */
.window *, .window *::before, .window *::after,
.title-bar *, .title-bar *::before, .title-bar *::after,
.window-body *, .window-body *::before, .window-body *::after {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

.window .title-bar button, .window button, .window input[type="button"],
.window input[type="submit"], .window .button {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* Scrollbar overrides */
::-webkit-scrollbar {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

::-webkit-scrollbar-thumb {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* Force override any remaining elements with high specificity */
#app *, #app *::before, #app *::after,
#root *, #root *::before, #root *::after,
.application *, .application *::before, .application *::after {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

#app button, #app a, #app [role="button"], #app input[type="button"],
#app input[type="submit"], #app input[type="reset"], #app .cursor-pointer,
#app [onclick], #root button, #root a, #root [role="button"],
#root input[type="button"], #root input[type="submit"], #root input[type="reset"],
#root .cursor-pointer, #root [onclick] {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* Animation and transition overrides */
*, *::before, *::after {
    cursor: url('./img/cursor.png') 5 5, auto !important;
    transition: none !important;
}

/* Ensure no animations interfere with cursor */
[style*="cursor"] {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

/* Tailwind utility overrides with highest specificity */
.cursor-auto { cursor: url('./img/cursor.png') 5 5, auto !important; }
.cursor-default { cursor: url('./img/cursor.png'), default !important; }
.cursor-pointer { cursor: url('./img/pointer.png') 5 5, pointer !important; }
.cursor-wait { cursor: url('./img/cursor.png'), wait !important; }
.cursor-text { cursor: url('./img/cursor.png'), text !important; }
.cursor-move { cursor: url('./img/cursor.png'), move !important; }
.cursor-help { cursor: url('./img/pointer.png'), help !important; }
.cursor-not-allowed { cursor: url('./img/cursor.png'), not-allowed !important; }

/* Media query overrides */
@media (hover: hover) {
    *, *::before, *::after {
        cursor: url('./img/cursor.png') 5 5, auto !important;
    }
    
    button:hover, a:hover, [role="button"]:hover, input[type="button"]:hover,
    input[type="submit"]:hover, input[type="reset"]:hover, .cursor-pointer:hover,
    [onclick]:hover {
        cursor: url('./img/pointer.png') 5 5, pointer !important;
    }
}

/* Print media override */
@media print {
    *, *::before, *::after {
        cursor: url('./img/cursor.png') 5 5, auto !important;
    }
}

/* Force any webkit or moz specific cursors */
input[type="range"]::-webkit-slider-thumb {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

input[type="range"]::-moz-range-thumb {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* BrowserHeader specific overrides */
#BrowserHeader *, #BrowserHeader *::before, #BrowserHeader *::after,
.browser-header *, .browser-header *::before, .browser-header *::after,
[class*="browser"] *, [class*="Browser"] *, [class*="header"] * {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

#BrowserHeader button, #BrowserHeader a, #BrowserHeader [role="button"],
#BrowserHeader input[type="button"], #BrowserHeader input[type="submit"],
#BrowserHeader .cursor-pointer, #BrowserHeader [onclick],
.browser-header button, .browser-header a, .browser-header [role="button"],
.browser-header input[type="button"], .browser-header input[type="submit"],
.browser-header .cursor-pointer, .browser-header [onclick] {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* Menu bar specific */
#BrowserHeader-menubar *, .menubar *, .menu-bar *,
[class*="menu"] *, [class*="Menu"] * {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

#BrowserHeader-menubar button, #BrowserHeader-menubar a,
.menubar button, .menubar a, .menu-bar button, .menu-bar a,
[class*="menu"] button, [class*="menu"] a {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* Final catch-all with maximum specificity */
html body div#app * {
    cursor: url('./img/cursor.png') 5 5, auto !important;
}

html body div#app button,
html body div#app a,
html body div#app [role="button"],
html body div#app input[type="button"],
html body div#app input[type="submit"],
html body div#app input[type="reset"],
html body div#app .cursor-pointer,
html body div#app [onclick] {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* Specific image targeting to override any conflicting classes */
img[src*="ththe300exhavenunderconstruction.gif"],
img[src*="benscape.png"],
img[src*="HeHeartlandLane5025imagesconstruction.gif"] {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
}

/* Override any remaining cursor-help classes */
.cursor-help img,
img.cursor-help {
    cursor: url('./img/pointer.png') 5 5, pointer !important;
} 