/**
 * Dominara imleçleri — PNG (32px) birincil; SVG yedek. head.ejs + sayfa CSS sonrası.
 * Hotspot (PNG): ok 3 3 · parmak 5 3 · kavrama 13 13 · metin 17 16
 */

@media (pointer: fine) {
    html.dominara-cursors-enabled,
    html.dominara-cursors-enabled body {
        cursor: url("/files/img/cursors/default.png") 3 3, url("/files/img/cursors/default.svg") 5 4, default !important;
    }

    html.dominara-cursors-enabled.dm-cursor-press:not(.dm-cursor-ripple-flash):not(.dm-inv-layout-drag-active),
    html.dominara-cursors-enabled.dm-cursor-press:not(.dm-cursor-ripple-flash):not(.dm-inv-layout-drag-active) body {
        cursor: url("/files/img/cursors/default-active.png") 3 3, url("/files/img/cursors/default-active.svg") 5 4, default !important;
    }

    html.dominara-cursors-enabled.dm-cursor-ripple-flash:not(.dm-inv-layout-drag-active),
    html.dominara-cursors-enabled.dm-cursor-ripple-flash:not(.dm-inv-layout-drag-active) body {
        cursor: url("/files/img/cursors/default-ripple.png") 3 3, url("/files/img/cursors/default-ripple.svg") 5 4, default !important;
    }

    html.dominara-cursors-enabled :is(
            a[href],
            button:not(:disabled):not(.dm-inv-cell__use),
            input[type="button"]:not(:disabled),
            input[type="submit"]:not(:disabled),
            input[type="reset"]:not(:disabled),
            [role="button"]:not([aria-disabled="true"]),
            label[for],
            select:not(:disabled),
            summary,
            .dm-inv-cat,
            .demirci-instance-slot:not(:disabled),
            .dm-meydan-hotspot,
            [data-inv-cat],
            [data-inv-money],
            [data-sifirlama],
            [data-use-result-close],
            [data-mobile-tab-btn],
            .cursor-pointer,
            .nav-link,
            .mobile-nav-link,
            .dm-page-back__btn,
            .dm-use-result__ok,
            .dm-inv-mobile-tabs__btn,
            .aa-btn,
            .ar-btn,
            .id-back-btn,
            .demirci-put-bench-btn,
            .demirci-clear-bench-btn,
            [class$="__btn"]:not(:disabled),
            [class*="-btn"]:not(:disabled):not(.dm-inv-cell__use)
        ):not(.dm-inv-cell--layout-draggable):not([draggable="true"]) {
        cursor: url("/files/img/cursors/pointer.png") 5 3, url("/files/img/cursors/pointer.svg") 7 5, pointer !important;
    }

    html.dominara-cursors-enabled.dm-cursor-press
        :is(
            a[href],
            button:not(:disabled):not(.dm-inv-cell__use),
            [role="button"]:not([aria-disabled="true"]),
            label[for],
            .dm-inv-cat,
            .demirci-instance-slot:not(:disabled),
            .dm-meydan-hotspot,
            [data-inv-cat],
            [class*="-btn"]:not(:disabled):not(.dm-inv-cell__use)
        ):not(.dm-inv-cell--layout-draggable) {
        cursor: url("/files/img/cursors/pointer-active.png") 5 3, url("/files/img/cursors/pointer-active.svg") 7 5, pointer !important;
    }

    html.dominara-cursors-enabled .dm-inv-grid .dm-inv-cell--empty {
        cursor: url("/files/img/cursors/default.png") 3 3, default !important;
    }

    html.dominara-cursors-enabled .dm-inv-grid .dm-inv-cell--layout-draggable:not(.dm-inv-cell--equip-blocked) {
        cursor: url("/files/img/cursors/grab.png") 13 13, grab !important;
    }

    html.dominara-cursors-enabled .dm-inv-grid .dm-inv-cell--equip-blocked {
        cursor: url("/files/img/cursors/not-allowed.png") 3 3, not-allowed !important;
    }

    html.dominara-cursors-enabled .dm-inv-loadout__slot[data-use-action],
    html.dominara-cursors-enabled .dm-inv-slot[data-use-action] {
        cursor: url("/files/img/cursors/pointer.png") 5 3, pointer !important;
    }

    html.dominara-cursors-enabled .dm-inv-cell--layout-draggable,
    html.dominara-cursors-enabled .dm-inv-grid [draggable="true"][data-inv-key] {
        cursor: url("/files/img/cursors/grab.png") 13 13, grab !important;
    }

    html.dominara-cursors-enabled.dm-inv-layout-drag-active,
    html.dominara-cursors-enabled.dm-inv-layout-drag-active body,
    html.dominara-cursors-enabled.dm-inv-layout-drag-active .dm-inv-grid,
    html.dominara-cursors-enabled.dm-inv-layout-drag-active .dm-inv-grid * {
        cursor: url("/files/img/cursors/grabbing.png") 13 13, grabbing !important;
    }

    html.dominara-cursors-enabled input[type="text"],
    html.dominara-cursors-enabled input[type="search"],
    html.dominara-cursors-enabled input[type="email"],
    html.dominara-cursors-enabled input[type="password"],
    html.dominara-cursors-enabled input[type="url"],
    html.dominara-cursors-enabled input[type="tel"],
    html.dominara-cursors-enabled input[type="number"],
    html.dominara-cursors-enabled textarea,
    html.dominara-cursors-enabled [contenteditable="true"] {
        cursor: url("/files/img/cursors/text.png") 17 16, text !important;
    }

    html.dominara-cursors-enabled .dm-cursor-wait,
    html.dominara-cursors-enabled [aria-busy="true"] {
        cursor: url("/files/img/cursors/wait.png") 16 16, wait !important;
    }

    html.dominara-cursors-enabled :is(
            .dm-cursor-not-allowed,
            [disabled],
            [aria-disabled="true"],
            .dm-inv-cell--equip-blocked,
            .demirci-instance-slot--equipped,
            button:disabled,
            input:disabled
        ) {
        cursor: url("/files/img/cursors/not-allowed.png") 3 3, not-allowed !important;
    }

    html.dominara-cursors-enabled .dm-cursor-move {
        cursor: url("/files/img/cursors/move.png") 16 16, move !important;
    }

    html.dominara-cursors-enabled .dm-cursor-crosshair {
        cursor: url("/files/img/cursors/crosshair.png") 16 16, crosshair !important;
    }

    html.dominara-cursors-enabled .dm-cursor-help {
        cursor: url("/files/img/cursors/help.png") 5 3, help !important;
    }

    html.dominara-cursors-enabled .dm-cursor-zoom-in {
        cursor: url("/files/img/cursors/zoom-in.png") 13 13, zoom-in !important;
    }
}

@media (pointer: fine) {
    .dm-cursor-fx-layer {
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 2147483646;
        overflow: hidden;
    }

    .dm-cursor-fx-layer__ring {
        position: absolute;
        width: 28px;
        height: 28px;
        margin: -14px 0 0 -14px;
        border: 2px solid rgba(20, 16, 16, 0.85);
        border-radius: 50%;
        opacity: 0;
        transform: scale(0.35);
        animation: dm-cursor-ring 0.42s ease-out forwards;
        box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35);
    }

    .dm-cursor-fx-layer__ring::after {
        content: "";
        position: absolute;
        inset: 4px;
        border: 1.5px solid rgba(20, 16, 16, 0.45);
        border-radius: 50%;
        opacity: 0.7;
    }

    @keyframes dm-cursor-ring {
        0% {
            opacity: 0.95;
            transform: scale(0.35);
        }
        100% {
            opacity: 0;
            transform: scale(1.65);
        }
    }
}
