/*HISTORY*/
#history {
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    overflow-x: hidden;
    box-sizing: border-box;
}

.history {
    width: 100%;
    box-sizing: border-box;
}

.history-header {
    width: 100%;
    height: 62px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    background: linear-gradient(0, #01021000 0%, #010210 100%);
    position: relative;

    &:after {
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background: #ffffff;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(90deg, rgba(147, 154, 187, 0.00) 0%, #E03B2A 47.5%, rgba(147, 154, 187, 0.00) 97.81%);;
    }
}

.history-header_title {
    font-family: 'Noto Sans', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    height: 100%;
    padding: 24px 0 0 0;
    box-sizing: border-box;
}

.history-content {
    padding: 20px 4px 50px;
    position: relative;
    height: calc(100% - 62px);
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.history-content_table {
    margin: 20px 4px 0;
    padding-right: 3px; /*we can remove it */
    height: 100%;
    overflow-y: scroll;
    box-sizing: border-box;
}

.history-table {
    border-collapse: collapse;
    box-sizing: border-box;
}

.history-head-id,
.history-col-id {
    width: 40%;
}

.history-head-price,
.history-col-price {
    width: 60%;
}

.history-head-price-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.history-col-price-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.history-col-price .history-price.bet {
    grid-column: 1;
    grid-row: 1;
}

.history-col-price .history-price.win {
    grid-column: 2;
    grid-row: 1;
}

.history-col-price .history-balance {
    grid-column: 1 / span 2;
    grid-row: 2;
}

.history-table tr td:first-child {
    border-radius: 8px 0 0 8px;
}

.history-table tr td:last-child {
    border-radius: 0 8px 8px 0;
}

.history-table th,
.history-table td {
    box-sizing: border-box;
    min-height: 40px;
    border: none;
    text-align: left;
    padding: 4px 2px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.history-table th {
    font-weight: 800;
    font-family: 'Noto Sans', sans-serif;
    font-size: 16px;
    color: #C0C9F5;
}


.history-table tbody tr:nth-child(odd) {
    background-color: #545D844D;
}

.history-table tr th:first-child,
.history-table tr td:first-child {
    padding: 4px 4px 4px 16px;
}

.history-table tr td:last-child {
    padding: 0 10px 0 4px;
}

.history-table tr td:last-child svg {
    display: block;
    width: 10px;
    height: 16px;
}

.history-date-time {
    font-family: 'Noto Sans', sans-serif;
    font-size: 12px;
    line-height: 14px;
    font-weight: 500;
    color: #C0C9F5;
    display: block;
}

.history-id {
    font-family: 'Noto Sans', sans-serif;
    font-size: 12px;
    line-height: 14px;
    font-weight: 700;
    display: block;
    color: #fff;
}

.history-price {
    font-family: 'Noto Sans', sans-serif;
    font-size: 13px;
    line-height: 100%;
    font-weight: 800;
    color: #fff;
    display: block;
}

.history-balance {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-family: 'Noto Sans', sans-serif;
    font-size: 12px;
    line-height: 14px;
    font-weight: 500;
    color: #C0C9F5;
    display: flex;
    flex-direction: column;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-family: 'Noto Sans', sans-serif;
}

.pagination_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(84, 93, 132, 0.30);
    border: none;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #fff;

    svg {
        display: block;
        width: 16px;
        height: 16px;
    }
}

.pagination_btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination_indicator {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    min-width: 20px;
    text-align: center;
    font-family: 'Noto Sans', sans-serif;
}

/*HISTORY ITEM*/
.history-item {
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 0 24px;
    margin: auto;
}

.history-item_header {
    width: 100%;
    height: 62px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: relative;
}

.history-item_back {
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 23px;
    outline: none;
    border: none;
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #fff;
    text-transform: uppercase;
}

.history-item_back span svg {
    display: block;
    width: 9px;
    height: 16px;
}

.history-item_details {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.history-item_logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;

    img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
        border-radius: 5px;
    }
}

.history-item_info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
}

.info_title {
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #C0C9F5;
    margin: 0;
}

.info_text {
    font-family: 'Rubik', sans-serif;
    font-size: 10px;
    color: #fff;
    margin: 0;
    font-weight: 800;
}

.history-item_reply {
    width: 30px;
    height: 30px;
    outline: none;
    border: none;
    background: url("../svgs/replay.svg") no-repeat center;
    background-size: contain;
    cursor: pointer;
    display: none;
}

.history-item_content {
    display: flex;
    flex-direction: column;
}

.history-item_content:first-child {
    position: relative;

    &:after {
        content: '';
        display: block;
        width: 100%;
        height: 2px;
        background: #ffffff;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        background: linear-gradient(90deg, #939ABB00 0%, #939ABB 50%, #939ABB00 100%);
    }
}

.history-item_carousel {
    padding: 24px 0 44px;
    position: relative;
}

.carousel_main {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.carousel_button {
    box-sizing: border-box;
    padding: 8px;
    border: none;
    outline: none;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;

    &:disabled {
        opacity: 0.5;
    }
}

.prev:before {
    content: '';
    display: block;
    width: 9px;
    height: 16px;
    background: url("../svgs/arrow_left.svg") no-repeat center;
    background-size: contain;
}

.next:before {
    content: '';
    display: block;
    width: 9px;
    height: 16px;
    background: url("../svgs/arrow_right.svg") no-repeat center;
    background-size: contain;
}

.carousel_content {
    width: 72%;
    aspect-ratio: 4 / 3;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    background: #58576C;
}

.carousel_thumbs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    margin: 0;
}

.carousel_thumbs_item {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5A586E;
}

.carousel_thumbs_item.active {
    background: #fff;
}

.playout_title {
    margin-top: 20px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: #c0ddff;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}

.playout_title span svg {
    display: block;
    width: 16px;
    height: 16px;
}

.playout_message {
    min-height: 46px;
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-top: 12px;
    text-transform: uppercase;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 6px;
    background: rgba(84, 93, 132, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.playout {
    padding: 0 0 46px;
}

.playout_list {
    margin: 12px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    counter-reset: playout;
}

.playout_list .playout_item::before,
.playout_list .playout_item .playout_info {
    background: rgba(84, 93, 132, 0.3);
}

.playout_item {
    display: grid;
    grid-template-columns: 36px clamp(56px, 19.6vw, 96px) 1fr;
    min-height: clamp(36px, 6vh, 64px);
    align-items: stretch;
    gap: 8px;
    height: auto;
}

.playout_item::before {
    counter-increment: playout;
    content: counter(playout) ".";
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rubik', sans-serif;
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: #fff;
    border-radius: 4px;
}

.playout_content {
    display: grid;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #545D84;
    gap: 1px;
    padding: 3px;
}

.playout_content div {
    background: transparent;
    border-radius: 2px;
    aspect-ratio: 1 / 1;
    width: 100%;
}

.playout_content div.inactive {
    background: rgba(192, 201, 245, 1);
}

.playout_content div.active {
    background: rgba(4, 208, 72, 1);
}

.playout_content div.screen-win {
    background: rgb(4, 202, 225);
}

.playout_content div.cascade-win {
    background: rgba(4, 208, 72, 1);
}

.playout_info {
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-radius: 4px;
}

.playout_info--item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.playout_info--title {
    font-family: 'Noto Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #C0C9F5;
}

.playout_info--text {
    font-family: 'Noto Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.history-empty {
    width: 100%;
    height: 20vh;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    font-family: 'Noto Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    /*text-transform: uppercase;*/
}

@media (min-width: 768px) and (min-height: 768px) {
    .history-table th, .history-table td {
        padding: 16px 2px;
    }

    .history-item_header,
    .history-item_wrap {
        max-width: 90vw;
        margin: auto;
    }

    .history-item_back {
        font-size: 18px;
    }

    .history-header_title {
        font-size: 22px;
    }

    .info_title {
        font-size: 18px;
    }

    .info_text {
        font-size: 12px;
    }

    .history-date-time {
        font-size: 14px;
    }

    .history-id {
        font-size: 14px;
    }

    .history-price {
        font-size: 15px;
    }

    .history-balance {
        font-size: 14px;
    }

    .pagination_indicator {
        font-size: 16px;
    }

    .playout_title {
        font-size: 22px;
    }

    .playout_message {
        font-size: 17px;
        padding: 22px;
    }

    .playout_info--title {
        font-size: 17px;
    }

    .playout_info--text {
        font-size: 17px;
    }

    .info_title {
        font-size: 22px;
    }

    .info_text {
        font-size: 18px;
    }

    .history-table th {
        font-size: 18px;
    }

    .history-table td {
        font-size: 16px;
    }

    .pagination_btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (orientation: landscape) {
    .history-item {
        padding: 0 16px 40px;
        overflow: hidden;
        max-width: unset;
    }

    .playout_item {
        grid-template-columns: 36px clamp(48px, 11vw, 67px) 1fr;
    }

    .history-item_header {
        height: 46px;
    }

    .history-content .pagination,
    .history-item_header .pagination {
        margin: 0;
    }

    .carousel_content {
        width: 62%;
    }

    .history-item_wrap {
        display: flex;
        width: 100%;
        overflow: hidden;
    }

    .history-item_content {
        width: 50%;
        min-height: 262px;
    }

    .history-item_content:first-child {
        padding-right: 10px;

        &:after {
            content: '';
            display: block;
            width: 2px;
            height: 100%;
            background: #ffffff;
            position: absolute;
            left: unset;
            right: 0;
            top: 50%;
            transform: translate(0, -50%);
            background: linear-gradient(180deg, #939ABB00 0%, #939ABB 50%, #939ABB00 100%);
        }
    }

    .history-item_content.playout {
        height: calc(100vh - 46px - 46px);
        overflow: hidden;
        padding: 0 0 0 10px;
    }

    .playout_wrap {
        height: 100%;
        overflow-y: auto;
    }
}

.history-id-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(4px, 0.5vw, 8px);
    padding-right: clamp(1vw, calc(5vw + 5vh), 15vw);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(24px, 2.3vw, 26px);
    height: clamp(24px, 2.3vw, 26px);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    z-index: 2;
}

.copy-btn .copied-icon {
    display: none;
}

.copy-btn.copied .copy-icon {
    display: none;
}

.copy-btn.copied .copied-icon {
    display: inline-block;
}

.copied-icon,
.copy-icon {
    width: 100%;
    height: 100%;
}

@media (orientation: portrait ) {
    .history-id-wrap {
        padding-right: clamp(1vw, calc(2vw - 0.5vh), 3vw);
    }
}