/* ==========================================
   Кастомный курсор только для ПК
========================================== */

@media (pointer: coarse) {

    .torch-cursor{
        display:none !important;
    }

}

/* скрываем системный курсор только на ПК */

@media (pointer:fine){

html,
body,
a,
button,
input,
textarea,
select,
label{

    cursor:none !important;

}

}

/* ==========================================
   Горелка
========================================== */

.torch-cursor{

    position:fixed;

    top:0;
    left:0;

    width:46px;
    height:46px;

    pointer-events:none;

    z-index:2147483647;

    will-change:
        transform,
        left,
        top;

    transform:
        translate(-14px,-34px)
        rotate(-45deg);

    transition:
        transform .08s linear;

}

/* сама картинка */

.torch-cursor img{

    width:100%;
    height:100%;

    display:block;

    user-select:none;
    -webkit-user-drag:none;

}

/* ==========================================
   Наведение
========================================== */

.torch-cursor.welding{

    transform:
        translate(-12px,-32px)
        rotate(-47deg)
        scale(.98);

}

/* ==========================================
   Клик
========================================== */

.torch-cursor.click{

    transform:
        translate(-10px,-30px)
        rotate(-52deg)
        scale(.93);

}

/* ==========================================
   Дуга сварки
========================================== */

.torch-arc{

    position:absolute;

    left:-7px;
    top:33px;

    width:12px;
    height:12px;

    border-radius:50%;

    opacity:0;

    background:
        radial-gradient(circle,
        rgba(170,240,255,1) 0%,
        rgba(90,220,255,.9) 35%,
        rgba(90,220,255,0) 100%);

    filter:blur(2px);

    transition:.08s;

}

.torch-cursor.welding .torch-arc{

    opacity:1;

    animation:
        weldingArc .08s infinite alternate;

}

@keyframes weldingArc{

    from{

        transform:
            scale(.8);

    }

    to{

        transform:
            scale(1.15);

    }

}

/* ==========================================
   Кастомный курсор только для ПК
========================================== */

/* Отключаем кастомный курсор на мобильных */
@media (pointer: coarse) {
    .torch-cursor {
        display: none !important;
    }
    
    /* Возвращаем системный курсор на мобильных */
    html,
    body,
    a,
    button,
    input,
    textarea,
    select,
    label {
        cursor: auto !important;
    }
}

/* Дополнительная проверка для планшетов с мышкой */
@media (max-width: 1024px) and (pointer: fine) {
    .torch-cursor {
        display: none !important;
    }
    
    html,
    body,
    a,
    button,
    input,
    textarea,
    select,
    label {
        cursor: auto !important;
    }
}

/* скрываем системный курсор только на ПК */
@media (pointer: fine) and (min-width: 1025px) {
    html,
    body,
    a,
    button,
    input,
    textarea,
    select,
    label {
        cursor: none !important;
    }
}

/* ==========================================
   Горелка
========================================== */

.torch-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 46px;
    height: 46px;
    pointer-events: none;
    z-index: 2147483647;
    will-change: transform, left, top;
    transform: translate(-14px, -34px) rotate(-45deg);
    transition: transform .08s linear;
}

/* сама картинка */
.torch-cursor img {
    width: 100%;
    height: 100%;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* ==========================================
   Наведение
========================================== */

.torch-cursor.welding {
    transform: translate(-12px, -32px) rotate(-47deg) scale(.98);
}

/* ==========================================
   Клик
========================================== */

.torch-cursor.click {
    transform: translate(-10px, -30px) rotate(-52deg) scale(.93);
}

/* ==========================================
   Дуга сварки
========================================== */

.torch-arc {
    position: absolute;
    left: -7px;
    top: 33px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(circle,
        rgba(170,240,255,1) 0%,
        rgba(90,220,255,.9) 35%,
        rgba(90,220,255,0) 100%);
    filter: blur(2px);
    transition: .08s;
}

.torch-cursor.welding .torch-arc {
    opacity: 1;
    animation: weldingArc .08s infinite alternate;
}

@keyframes weldingArc {
    from {
        transform: scale(.8);
    }
    to {
        transform: scale(1.15);
    }
}

/* ==========================================
   СКРЫВАЕМ КУРСОР НАД iframe (карта)
========================================== */

/* Когда курсор наводится на iframe, скрываем кастомный курсор */
.torch-cursor {
    /* По умолчанию курсор виден */
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* Если курсор наведен на iframe или его родителя */
.torch-cursor.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Также скрываем эффекты над iframe */
#cursorEffects.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}