/* === Страница: CTA === */
.pageStatis.roulettePage {
    max-width: 640px;
    margin-top: 30px;
    text-align: center;
}

.roulettePage__title {
    color: #141414;
    font: normal 500 40px / 1.2 'Manrope', sans-serif;
    text-align: center;
    padding: 0;
    margin: 0 0 16px;
}

.roulettePage__lead {
    color: #6b6b6b;
    font: normal 400 16px / 1.5 'Manrope', sans-serif;
    text-align: center;
    max-width: 520px;
    margin: 0 auto 32px;
}

.roulettePage__open {
    margin: 0 auto;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.roulettePage__open:hover {
    background-color: #000;
}

.roulettePage__open:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(20, 20, 20, 0.35);
}

/* === Модалка рулетки === */
html.roulette--lock,
html.roulette--lock body {
    overflow: hidden;
    overscroll-behavior: none;
}

.rouletteModal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.45);
    /* Выше fixed-шапки (.header = 9999) и fancybox (99999) */
    z-index: 100000;
}

.rouletteModal__dialog {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    width: min(960px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    padding: 36px 32px 40px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    /* Скролл оставляем для низких экранов, полосу не показываем — иначе дёргается ширина */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rouletteModal__dialog::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.rouletteModal__close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #141414;
    padding: 4px 10px;
    z-index: 2;
}

.rouletteModal__close:hover {
    color: #782431;
}

/* --- Контент внутри модалки --- */
.roulette {
    max-width: 100%;
}

.roulette__title {
    color: #141414;
    font: normal 500 32px / 1.2 'Manrope', sans-serif;
    text-align: center;
    padding: 0 28px 0 0;
    margin: 0 0 12px;
}

.roulette__lead {
    color: #6b6b6b;
    font: normal 400 15px / 1.5 'Manrope', sans-serif;
    text-align: center;
    max-width: 520px;
    margin: 0 auto 32px;
}

.roulette__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

/* --- Колесо (премиум: ч/б + золото) --- */
.roulette__wheelWrap {
    position: relative;
    width: min(100%, 420px);
    margin: 0 auto;
    /* Место под стрелку сверху — иначе overflow диалога мигает при анимации */
    padding-top: 28px;
    box-sizing: content-box;
}

.roulette__pointer {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 3;
    width: 28px;
    height: 30px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #f0e0b8 0%, #e8d5a3 25%, #c5a059 55%, #b8924a 100%);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    filter: drop-shadow(0 2px 4px rgba(184, 146, 74, 0.45));
}

.roulette__wheelOuter {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 12px;
    box-sizing: border-box;
    background: linear-gradient(
        145deg,
        #f0e0b8 0%,
        #c5a059 22%,
        #e8d5a3 45%,
        #b8924a 68%,
        #f0e0b8 88%,
        #c5a059 100%
    );
    box-shadow:
        0 0 0 1px rgba(184, 146, 74, 0.35),
        inset 0 1px 2px rgba(255, 255, 255, 0.55),
        inset 0 -2px 4px rgba(127, 106, 80, 0.35),
        0 14px 40px rgba(20, 20, 20, 0.18);
}

.roulette__wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    will-change: transform;
    box-shadow:
        inset 0 0 0 2px rgba(20, 20, 20, 0.12),
        inset 0 0 18px rgba(0, 0, 0, 0.08);
}

.roulette__wheel.is-spinning {
    transition: transform 4.5s cubic-bezier(0.12, 0.65, 0.08, 1);
}

.roulette__label {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50%;
    height: 0;
    transform-origin: 0 0;
    pointer-events: none;
}

.roulette__labelText {
    display: block;
    position: absolute;
    left: 52%;
    top: -0.6em;
    font: normal 600 15px / 1 'Manrope', sans-serif;
    letter-spacing: 0.06em;
    white-space: nowrap;
    transform: rotate(90deg);
}

.roulette__label--dark .roulette__labelText {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.roulette__hub {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 68px;
    height: 68px;
    margin: -34px 0 0 -34px;
    border-radius: 50%;
    padding: 3px;
    box-sizing: border-box;
    background: linear-gradient(
        145deg,
        #f0e0b8 0%,
        #c5a059 30%,
        #b8924a 55%,
        #e8d5a3 80%,
        #c5a059 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.18),
        inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.roulette__hub::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 1px 3px rgba(20, 20, 20, 0.08);
}

.roulette__hubText {
    position: relative;
    z-index: 1;
    font: normal 700 22px / 1 'Manrope', sans-serif;
    color: #b8924a;
}

/* --- Форма --- */
.roulette__form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.roulette__field {
    margin-bottom: 8px;
}

.roulette__labelField {
    display: block;
    font: normal 500 13px 'Manrope', sans-serif;
    margin-bottom: 6px;
    color: #141414;
}

.roulette__req {
    color: #782431;
}

.roulette__input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c8c8c8;
    border-radius: 8px;
    padding: 12px 14px;
    font: normal 400 15px 'Manrope', sans-serif;
    color: #141414;
    background: #fff;
    caret-color: auto !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.roulette__input:hover:not(:disabled):not(:focus) {
    border-color: #aeaeae;
}

.roulette__input:focus,
.roulette__input:focus-visible {
    outline: none;
    border-color: #141414;
    box-shadow: 0 0 0 2px rgba(20, 20, 20, 0.12);
}

.roulette__input.is-invalid {
    border-color: #c62828;
}

.roulette__error {
    margin: 14px 0 0;
    color: #c62828;
    font: normal 400 14px / 1.4 'Manrope', sans-serif;
}

.roulette__spinBtn {
    margin-top: 24px;
    width: 100%;
    max-width: 100%;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.roulette__spinBtn:hover:not(:disabled) {
    background-color: #000;
}

.roulette__spinBtn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.roulette__spinBtn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(20, 20, 20, 0.35);
}

/* --- Оверлей результата (поверх модалки рулетки) --- */
.rouletteResult__overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20, 0.45);
    z-index: 100010;
}

.rouletteResult__modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100020;
    width: min(420px, calc(100vw - 32px));
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px 36px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.rouletteResult__close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #141414;
    padding: 4px 10px;
}

.rouletteResult__title {
    font: normal 500 24px 'Manrope', sans-serif;
    margin: 0 0 12px;
    color: #141414;
    padding-right: 20px;
}

.rouletteResult__prize {
    font: normal 600 28px / 1.2 'Manrope', sans-serif;
    color: #b8924a;
    margin: 0 0 20px;
}

.rouletteResult__hint {
    font: normal 400 14px 'Manrope', sans-serif;
    color: #6b6b6b;
    margin: 0 0 8px;
}

.rouletteResult__codeWrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 12px;
}

.rouletteResult__code {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font: normal 600 16px / 1 'Manrope', sans-serif;
    color: #141414;
    letter-spacing: 0.04em;
}

.rouletteResult__copy {
    flex-shrink: 0;
    border: 1px solid #141414;
    border-radius: 8px;
    background: #fff;
    color: #141414;
    font: normal 500 13px 'Manrope', sans-serif;
    padding: 0 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.rouletteResult__copy:hover {
    background: #141414;
    color: #fff;
}

.rouletteResult__note {
    font: normal 400 12px / 1.4 'Manrope', sans-serif;
    color: #9a9a9a;
    margin: 0 0 8px;
}

.rouletteResult__catalog {
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    box-sizing: border-box;
}

.rouletteResult__catalog:hover {
    background-color: #000;
    color: #fff;
}

/* --- Адаптив --- */
@media (max-width: 860px) {
    .rouletteModal__dialog {
        padding: 28px 20px 32px;
    }

    .roulette__layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .roulette__wheelWrap {
        width: min(100%, 340px);
    }

    .roulettePage__title {
        font-size: 32px;
    }

    .roulette__title {
        font-size: 26px;
    }

    .roulette__labelText {
        font-size: 13px;
        left: 48%;
    }
}

@media (max-width: 480px) {
    .pageStatis.roulettePage {
        margin-top: 16px;
    }

    .roulettePage__title {
        font-size: 26px;
    }

    .roulettePage__lead {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .rouletteModal__dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        padding: 24px 16px 28px;
    }

    .roulette__title {
        font-size: 22px;
    }

    .roulette__lead {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .roulette__wheelWrap {
        width: min(100%, 280px);
    }

    .roulette__hub {
        width: 52px;
        height: 52px;
        margin: -26px 0 0 -26px;
    }

    .roulette__hubText {
        font-size: 18px;
    }

    .roulette__labelText {
        font-size: 12px;
    }

    .roulette__pointer {
        width: 22px;
        height: 24px;
    }

    .roulette__wheelWrap {
        padding-top: 22px;
    }

    .roulette__wheelOuter {
        padding: 10px;
    }

    .rouletteResult__codeWrap {
        flex-direction: column;
    }

    .rouletteResult__copy {
        height: 42px;
    }
}
