/* site-ux.css: кнопка «Наверх», стрелки слайдера, сворачивание калькулятора на телефоне.
   Цвета сайта: #52362A (коричневый), #FE8D0B (оранжевый), #FFC583 (персиковый). */

/* ---------- Слайдер на главной: без точек пагинации ---------- */
.sliderWrapper .jcarousel-pagination {
    display: none !important;
}

/* ---------- Стрелки слайдера (только ПК) ---------- */
.uxSliderArrow {
    display: none;
}

@media only screen and (min-width: 768px) {
    .sliderWrapper .jcarousel-wrapper {
        position: relative;
    }

    .uxSliderArrow {
        position: absolute;
        top: 50%;
        z-index: 5;
        display: block;
        width: 44px;
        height: 44px;
        margin: -22px 0 0;
        padding: 0;
        border: 2px solid #FFC583;
        border-radius: 50%;
        background: rgba(82, 54, 42, 0.55);
        color: #FFC583;
        cursor: pointer;
        opacity: 0.7;
        transition: opacity 0.2s ease, transform 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .uxSliderArrow svg {
        display: block;
        width: 22px;
        height: 22px;
        margin: 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform 0.2s ease;
    }

    .uxSliderPrev {
        left: 14px;
    }

    .uxSliderNext {
        right: 14px;
    }

    .sliderWrapper .jcarousel-wrapper:hover .uxSliderArrow {
        opacity: 0.9;
    }

    /* hover: the same see-through arrow, only a light movement (no colour fill) */
    .uxSliderArrow:hover,
    .uxSliderArrow:focus {
        opacity: 1 !important;
        transform: scale(1.08);
        outline: 0;
    }

    .uxSliderPrev:hover svg {
        transform: translateX(-3px);
    }

    .uxSliderNext:hover svg {
        transform: translateX(3px);
    }

    .uxSliderArrow:focus-visible {
        box-shadow: 0 0 0 3px #fff, 0 0 0 5px #FE8D0B;
    }
}

/* ---------- Кнопка «Наверх» ---------- */
.uxToTop {
    position: fixed;
    left: 16px;
    bottom: 56px;
    z-index: 1002;
    display: block;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    border: 2px solid #FFC583;
    border-radius: 50%;
    background: #52362A;
    color: #FFC583;
    box-shadow: 0 4px 14px rgba(82, 54, 42, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.uxToTop.isShown {
    opacity: 0.92;
    visibility: visible;
    transform: none;
}

.uxToTop svg {
    display: block;
    width: 24px;
    height: 24px;
    margin: 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.uxToTop:hover,
.uxToTop:focus {
    background: #FE8D0B;
    color: #fff;
    opacity: 1;
    outline: 0;
}

.uxToTop:focus-visible {
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #FE8D0B;
}

body.moonshineCalcOpen .uxToTop {
    display: none;
}

@media only screen and (max-width: 767px) {
    .uxToTop {
        left: 10px;
        bottom: 52px;
        width: 38px;
        height: 38px;
        border-width: 1px;
        background: rgba(82, 54, 42, 0.62);
        box-shadow: none;
    }

    .uxToTop.isShown {
        opacity: 0.8;
    }

    .uxToTop svg {
        width: 20px;
        height: 20px;
    }
}

@media print {
    .uxToTop,
    .uxSliderArrow,
    .uxCalcFold,
    .uxCalcTab {
        display: none !important;
    }
}

/* ---------- Калькулятор: сворачивание (только телефон) ---------- */
.uxCalcFold,
.uxCalcTab {
    display: none;
}

@media only screen and (max-width: 767px) {
    .uxCalcFold,
    .uxCalcTab {
        position: fixed;
        z-index: 10021;
        display: block;
        margin: 0;
        padding: 0;
        border: 0;
        background: #52362A;
        color: #FFC583;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .uxCalcFold svg,
    .uxCalcTab svg {
        display: block;
        width: 16px;
        height: 16px;
        margin: 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 2.6;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* кнопка «свернуть» у верхнего края вкладки */
    .uxCalcFold {
        left: 44px;
        top: calc(50% - 75px);
        width: 28px;
        height: 36px;
        border-radius: 0 8px 8px 0;
        opacity: 0.85;
    }

    /* свёрнутое состояние: узкий язычок у края */
    .uxCalcTab {
        left: 0;
        top: 50%;
        width: 20px;
        height: 64px;
        margin-top: -32px;
        border: 1px solid #FFC583;
        border-left: 0;
        border-radius: 0 8px 8px 0;
        opacity: 0.72;
        box-shadow: 0 3px 10px rgba(82, 54, 42, 0.25);
    }

    .uxCalcTab:hover,
    .uxCalcTab:focus,
    .uxCalcFold:hover,
    .uxCalcFold:focus {
        background: #FE8D0B;
        color: #fff;
        opacity: 1;
        outline: 0;
    }

    /* по умолчанию язычок скрыт, при сворачивании меняем местами */
    .uxCalcTab {
        display: none;
    }

    .moonshineCalc.uxCalcCollapsed .moonshineCalcLauncher,
    .moonshineCalc.uxCalcCollapsed .uxCalcFold {
        display: none !important;
    }

    .moonshineCalc.uxCalcCollapsed .uxCalcTab {
        display: block;
    }

    .moonshineCalc.is-open .uxCalcFold,
    .moonshineCalc.is-open .uxCalcTab {
        display: none !important;
    }
}
