@import url("fonts.css");

/* @import url("reset.css"); */


/* =========================
   ОБЩИЕ
========================= */

.wrapper {
    min-height: 100%;

    /* ВАЖНО:
       не обрезаем выпадающие списки по вертикали */
    overflow-x: clip;
    overflow-y: visible;

    display: flex;
    flex-direction: column;
}

.wrapper > main {
    flex-grow: 1;
}

body {
    margin: 0 auto;
    background-color: #E99635;
    font-family: "Proxima Nova", sans-serif;
}


/* =========================
   HEADER
========================= */

.header {
    background-color: #FFF500;
}

.header__panel {
    display: flex;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.header__logo {
    display: flex;
}

.button__logo {
    margin-top: 5px;
}

.icon_logo {
    height: 50px;
    width: 55px;
}

.inscription__logo {
    font-size: 20px;
    margin-left: 15px;
    margin-top: 14px;
    color: #C84B30;
    font-family: Comic Sans MS, Comic Sans;
}

.header__rules {
    display: flex;
    margin-left: 150px;
}

.header__rules a {
    padding-left: 30px;
    font-size: 16px;
    margin-top: 23px;
    text-decoration: none;
}


/* =========================
   ЯЗЫК
========================= */

.lang-switch {
    margin-left: auto;
    display: flex;
    gap: 10px;
    padding: 10px;
}

.lang-switch a {
    padding: 12px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #E46F2E;
    font-weight: bold;
    text-decoration: none;
    color: #A92F24;
}


/* =========================
   MAIN
========================= */

.main {
    margin-top: 20px;
    background-color: #E99635;
}

.title {
    font-size: 30px;
    text-align: center;
    color: #641B18;
}


/* =========================
     БЛОК
========================= */

.box {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    margin-top: 50px;
    background-color: #0088cc1e;
    max-width: 900px;
    border-radius: 24px;
    color: #A92F24;
    font-family: Comic Sans MS, Comic Sans;
}

.box-title {
    font-size: 20px;
    text-align: center;
}


/* =========================
   БЛОК ОБМЕНА
========================= */

.exchange {
    background-color: #F6B552;
    background-image:
        linear-gradient(
            rgba(0, 136, 204, 0.15),
            rgba(0, 136, 204, 0.15)
        ),
        url("../icon/kartinca.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 600px;
    height: 260px;
    margin: 0 auto;
    border-radius: 15px;
    position: relative;

    /*
       ВАЖНО:
       не ставить здесь overflow:hidden,
       иначе список монет может обрезаться.
    */
    overflow: visible;
}


/* =========================
   ФОРМА
========================= */

.form-exchange {
    display: flex;
    justify-content: center;

    /*
       ВАЖНО:
       создаём нормальную область для select
    */
    position: relative;
}

.select__give-away {
    margin-top: 10px;
    margin-bottom: 10px;
    margin-left: 10px;
    margin-right: 20px;
    width: 205px;
    position: relative;
}

.select__You-receive {
    margin-top: 10px;
    margin-bottom: 10px;
    margin-right: 10px;
    margin-left: 20px;
    width: 205px;
    position: relative;
}

.select__text {
    margin-bottom: 10px;
    margin-left: 10px;
    font-size: 18px;
}


/* =========================
   СТАРЫЙ SELECT
========================= */

.select-bloc1 {
    display: block;
    width: 205px;
    height: 30px;
    border-radius: 8px;
}

.select-with-icon select {
    font-size: 14px;
}

.select-with-icon {
    position: relative;
    width: 100%;
}

.select-with-icon img {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    pointer-events: none;
}

.select-with-icon select {
    padding-left: 40px;
    height: 40px;
}


/* =====================================================
   НОВЫЙ КАСТОМНЫЙ SELECT

   ИСПРАВЛЕНО:
   открытый select теперь поднимается выше второго select
===================================================== */

.crypto-select {
    position: relative;
    width: 205px;

    /*
       В закрытом состоянии обычный слой.
    */
    z-index: 1;
}


/*
   ГЛАВНОЕ ИСПРАВЛЕНИЕ

   Когда JavaScript добавляет .open,
   ВЕСЬ select поднимается наверх.

   Поэтому второй select больше не сможет
   перекрыть список первого.
*/
.crypto-select.open {
    z-index: 10000;
}


/* =========================
   ВЫБРАННАЯ МОНЕТА
========================= */

.crypto-current {
    width: 205px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    border: 1px solid #999;
    border-radius: 8px;
    padding: 0 10px;
    cursor: pointer;
    font-size: 14px;
    color: black;
    position: relative;
    z-index: 2;
}

.crypto-current-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.crypto-current-left img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.crypto-current-left span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================
   СТРЕЛКА
========================= */

.crypto-arrow {
    font-size: 11px;
    margin-left: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.crypto-select.open .crypto-arrow {
    transform: rotate(180deg);
}


/* =====================================================
   ВЫПАДАЮЩИЙ СПИСОК
===================================================== */

.crypto-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 205px;

    /*
       Высота списка.
       После неё появляется прокрутка.
    */
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: white;
    border: 1px solid #999;
    border-radius: 8px;

    /*
       Список находится выше остальных элементов.
    */
    z-index: 10001;
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.20);
}


/*
   Показываем список
*/
.crypto-select.open .crypto-list {
    display: block;
}


/* =====================================================
   ДОПОЛНИТЕЛЬНОЕ ИСПРАВЛЕНИЕ ДЛЯ ДВУХ SELECT
===================================================== */

/*
   Первый select
*/
#fromCryptoSelect {
    position: relative;
}


/*
   Второй select
*/
#toCryptoSelect {
    position: relative;
}


/*
   Если открыт первый
*/
#fromCryptoSelect.open {
    z-index: 20000;
}


/*
   Если открыт второй
*/
#toCryptoSelect.open {
    z-index: 20000;
}


/*
   Сами списки
*/
#fromCryptoList,
#toCryptoList {
    z-index: 20001;
}


/* =========================
   ЭЛЕМЕНТ МОНЕТЫ
========================= */

.crypto-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: none;
    background-color: white;
    color: black;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    box-sizing: border-box;
}

.crypto-item:hover {
    background-color: #0088cc1e;
}

.crypto-item.active {
    background-color: #1e70d1;
    color: white;
}

.crypto-item img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.crypto-item span {
    white-space: nowrap;
}


/* =========================
   SCROLL
========================= */

.crypto-list::-webkit-scrollbar {
    width: 6px;
}

.crypto-list::-webkit-scrollbar-track {
    background-color: #eee;
}

.crypto-list::-webkit-scrollbar-thumb {
    background-color: #999;
    border-radius: 10px;
}


/* =========================
   НАСТОЯЩИЙ SELECT

   Он скрыт, но используется JS
========================= */

.real-crypto-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}


/* =========================
   INPUT
========================= */

.input-give {
    width: 200px;
    height: 30px;
    border-radius: 8px;
    margin-top: 10px;
    background-color: #ffffffee;
    opacity: 1;
}

.limits-info {
    font-size: 9px;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

.input-email-wallet {
    width: 200px;
    height: 30px;
    border-radius: 8px;
}


/* =========================
   КНОПКА ОБМЕН
========================= */

.button-Exchange {
    display: block;
    margin: 0 auto;
    width: 300px;
    height: 40px;
    border-radius: 8px;
    background-color: rgba(0, 204, 204, 0.484);
}

.button-Exchange:hover {
    background-color: rgb(139, 234, 110);
}


/* =========================
   ТРЕТИЙ БЛОК
========================= */

/* .blok-Opisanie {
    display: flex;
} */

.blok-description {
    background-color: #0088cc1e;
    margin: 0 auto;
    max-width: 1080px;
    border-radius: 24px;
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.blok-description-text {
    font-size: 18px;
}


/* =========================
   ЧЕТВЕРТЫЙ БЛОК
========================= */

/* =========================
   ПАРТНЕРЫ
========================= */

.blok-Partners {
    width: 100%;

    margin-top: 40px;
    margin-bottom: 40px;

    overflow: hidden;
}


/* =========================
   ЗАГОЛОВОК
========================= */

.blok-Partners-title {
    margin-bottom: 40px;

    font-size: 30px;

    text-align: center;
}


/* =========================
   ОКНО БЕГУЩЕЙ СТРОКИ
========================= */

.partners-slider {
    width: 100%;

    overflow: hidden;

    position: relative;
}


/* =========================
   ДВИГАЮЩАЯСЯ ЛЕНТА
========================= */

.partners-track {
    display: flex;

    width: max-content;

    animation:
        partners-scroll 30s linear infinite;

    will-change: transform;
}


/* =========================
   ОДИН НАБОР ЛОГОТИПОВ
========================= */

.partners-group {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    gap: 45px;

    padding-right: 45px;
}


/* =========================
   ЛОГОТИПЫ
========================= */

.partners-group img {
    width: 150px;
    height: 55px;

    object-fit: contain;

    flex-shrink: 0;

    display: block;
}


/* =========================
   АНИМАЦИЯ
========================= */

@keyframes partners-scroll {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

}


/* =========================
   ПАУЗА ПРИ НАВЕДЕНИИ
========================= */

.partners-slider:hover .partners-track {
    animation-play-state: paused;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 530px) {

    .blok-Partners {
        margin-top: 30px;
        margin-bottom: 30px;
    }


    .blok-Partners-title {
        margin-bottom: 25px;

        font-size: 26px;
    }


    .partners-group {
        gap: 30px;

        padding-right: 30px;
    }


    .partners-group img {
        width: 110px;
        height: 45px;
    }


    /* немного быстрее на телефоне */

    .partners-track {
        animation-duration: 25s;
    }

}


/* =========================
   FOOTER
========================= */

.footer {
    display: flex;
    margin: 0 auto;
    margin-bottom: 20px;
}

.footer__rules a {
    margin-right: 30px;
    text-decoration: none;
}


/* =========================
   БУРГЕР
========================= */

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: auto;
    margin-right: 30px;
    z-index: 1001;
}

.burger span {
    width: 28px;
    height: 3px;
    background: black;
    margin: 5px 0;
    transition: 0.4s;
}


/* =========================
   АНИМАЦИЯ БУРГЕРА
========================= */

.burger.active span:nth-child(1) {
    transform:
        rotate(45deg)
        translate(5px, 6px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform:
        rotate(-45deg)
        translate(6px, -6px);
}


/* =========================
   MOBILE MENU
========================= */

.mobile-menu {
    position: fixed;

    top: 0;
    right: -100%;

    width: 175px;
    height: 100vh;

    background: #e99637f2;

    display: flex;
    flex-direction: column;

    padding: 80px 20px 30px;

    box-sizing: border-box;

    transition: 0.4s;

    z-index: 1000;
}

.mobile-menu a {
    margin-bottom: 20px;
    font-size: 18px;
    text-decoration: none;
    color: rgb(246, 242, 242);
}


/* =========================
   ЯЗЫКИ В БУРГЕР-МЕНЮ
========================= */

.mobile-language {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    margin-top: 25px;
}

.mobile-language a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    height: 38px;

    margin: 0;

    padding: 0;

    background-color: #ffffff;

    color: #000000;

    text-decoration: none;

    border-radius: 6px;

    font-size: 15px;
    font-weight: bold;
}

.mobile-language a:hover {
    background-color: #FFF500;
}


/* =========================
   АКТИВНОЕ MOBILE MENU
========================= */

.mobile-menu.active {
    right: 0;
}


/* =========================
   OVERLAY
========================= */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}


/* =========================
   TABLET
========================= */

@media (max-width: 1060px) {

    .header__rules {
        margin-left: 20px;
    }

}


@media (max-width: 770px) {

    .header__rules,
    .lang-switch {
        display: none;
    }

    .burger {
        margin-top: 8px;
        display: flex;
    }


    /* =====================
       ШАПКА
    ===================== */

    .header__logo {
        width: 100%;
        height: 65px;
        display: flex;
        align-items: center;
        position: relative;
    }


    /* =====================
       ЛОГОТИП СЛЕВА
    ===================== */

    .button__logo {
        position: absolute;
        left: 30px;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        z-index: 2;
    }

    .icon_logo {
        width: 55px;
        height: 45px;
        object-fit: contain;
        display: block;
    }


    /* =====================
       НАЗВАНИЕ ПО ЦЕНТРУ
    ===================== */

    .inscription__logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform:
            translate(-50%, -50%);
        margin: 0;
        font-size: 18px;
        text-align: center;
        white-space: nowrap;
        z-index: 1;
    }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 530px) {

    body {
        width: 100%;
    }


    /* =====================
       HEADER
    ===================== */

    .header__panel {
        position: relative;
        justify-content: center;
        height: 65px;
    }

    .button__logo {
        left: 15px;

        margin: 0;
    }

    .inscription__logo {
        font-size: 17px;
    }

    .burger {
        position: absolute;
        right: 5px;
        margin-right: 10px;
    }


    /* =====================
       MAIN
    ===================== */

    .main {
        margin-top: 10px;
    }

    .title {
        font-size: 26px;
    }


    /* =====================
       EXCHANGE
    ===================== */

    .exchange {
        width: calc(100% - 20px);
        height: auto;
        padding-top: 10px;
        padding-bottom: 20px;

        /*
           ВАЖНО:
           список не обрезается
        */
        overflow: visible;
    }


    /* =====================
       ФОРМА В КОЛОНКУ
    ===================== */

    .form-exchange {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        position: relative;
    }


    .select__give-away,
    .select__You-receive {
        width: 90%;
        margin-left: 0;
        margin-right: 0;
        position: relative;
    }


    .select__text {
        font-size: 18px;
    }


    /* =================================================
       CUSTOM SELECT MOBILE
    ================================================= */

    .crypto-select {
        width: 100%;
        z-index: 1;
    }


    /*
       ГЛАВНОЕ ИСПРАВЛЕНИЕ НА МОБИЛЬНОМ

       Открытый список всегда находится
       поверх второго select.
    */
    .crypto-select.open {
        z-index: 20000;
    }


    .crypto-current {
        width: 100%;
        height: 44px;
        font-size: 15px;
        box-sizing: border-box;
    }


    .crypto-current-left img {
        width: 23px;
        height: 23px;
    }


    .crypto-list {
        width: 100%;

        /*
           Высота списка на телефоне
        */
        max-height: 300px;
        z-index: 20001;
        box-sizing: border-box;
    }


    /*
       Первый список
    */
    #fromCryptoSelect.open {
        z-index: 30000;
    }


    /*
       Второй список
    */
    #toCryptoSelect.open {
        z-index: 30000;
    }


    #fromCryptoList,
    #toCryptoList {
        z-index: 30001;
    }


    .crypto-item {
        font-size: 15px;
        padding: 9px 10px;
    }


    .crypto-item img {
        width: 23px;
        height: 23px;
    }


    /* =====================
       INPUT
    ===================== */

    .input-give {
        width: 100%;
        height: 36px;
        box-sizing: border-box;
    }

    .input-email-wallet {
        width: 100%;
        height: 36px;
        box-sizing: border-box;
    }

    .limits-info {
        font-size: 12px;
    }


    /* =====================
       КНОПКА ОБМЕНА
    ===================== */

    .button-Exchange {
        width: 90%;
        margin-top: 10px;
    }


    /* =====================
       ЛИЦЕНЗИЯ
    ===================== */

    .box {
        width: calc(100% - 20px);
        margin-top: 30px;
        padding: 10px;
        box-sizing: border-box;
    }

    .box-cartinka {
        margin-right: 5px;
    }

    .box-title {
        font-size: 17px;
    }


    /* =====================
       DESCRIPTION
    ===================== */

    .blok-description {
        width: calc(100% - 30px);
        padding: 15px;
        box-sizing: border-box;
    }

    .blok-description-text {
        font-size: 16px;
    }


    /* =====================
       PARTNERS
    ===================== */

    .blok-Partners {
        margin-bottom: 20px;
    }

    .blok-Partners-logo {
        text-align: center;
    }

    .blok-Partners-logo img {
        width: 90px;
        height: 25px;
        margin: 10px;
    }


    /* =====================
       FOOTER
    ===================== */

    .footer__rules {
        padding: 0 15px;
    }

    .footer__rules a {
        text-align: center;
        display: block;
        margin-right: 15px;
        margin-bottom: 7px;
    }

}