.product-size__wrapper {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: #00000050;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100% !important;
}
.product-size--show {
    display: flex;
}
.product-size__header {
    margin-bottom: 20px;
}
.product-size__content {
    overflow: hidden;
}

.product-size__table {
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
}
.product-size__table::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.product-size__table::-webkit-scrollbar-track {
    background-color: transparent
}
.product-size__table::-webkit-scrollbar-thumb {
    height: 30px;
    background-color: #d3d4dd;
    border-radius: 4px;
}
.product-size__table::-webkit-scrollbar-thumb:hover {
    background: #605f65
}

.product-size {
    position: relative;
    width: 100%;
    max-width: 970px;
    margin: 0 auto;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,.2);
}
.product-size__close {
    position: absolute;
    top: 5px;
    right: 5px;
}

.product-size__title {
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
}
.product-size__sticky {
    position: sticky;
    top: 0;
    left: 0;
}

.product-size__tr {
    display: flex;
    cursor: pointer;
    background-color: #fff;
}
.product-size__tr:not(.product-size--selected):hover {
    background-color: #f6f6f9;
}
.product-size--selected {
    background-color: var(--color-primary, #cb11ab);
}
.product-size--selected:hover {
    background-color: var(--color-primary-hover, #cb11ab);
}
.product-size--disabled {
    color: #ccc;
}
.product-size__tr > div {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
}
.product-size__td:empty:before {
    content: "-";
}

@media (min-width: 768px) {
    .product-size {
        padding: 28px 40px 40px 40px;
        height: 80vh;
        border-radius: 20px;
    }
    .product-size__content {
        display: flex;
        height: calc(100% - 28px - 25px - 65px);
        overflow: auto;
    }
    .product-size__th:first-child {
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }
    .product-size__th:last-child {
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }
    .product-size__th {
        background-color: #eeeeee;
    }
    .product-size__footer {
        margin-top: 20px;
    }
}
@media (max-width: 768px) {
    .product-size {
        padding: 20px 20px 0 20px;
        margin-top: auto;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    .product-size__content {
        display: flex;
        flex-direction: column;
        height: 40vh;
        overflow: auto;
    }
    .product-size__table {
        flex-direction: row;
    }
    .product-size__tr {
        flex-direction: column;
    }
    .product-size__tr:not(.product-size--selected) .product-size__td:nth-child(odd) {
        background-color: #f3f3f3;
    }
    .product-size__th {
        background-color: #fff;
    }
    .product-size__th:first-child {
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }
    .product-size__th:last-child {
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }
    .product-size__footer {
        display: none;
    }
}

#modal-size {
    --color-primary: #00a3e1;
    --color-primary-hover: #00b9ff;
    --border-radius: 0;
}
#modal-size .product-size {
    max-width: 450px;
    height: 45vh;
}
#modal-size .product-size__close {
    width: 40px;
    height: 40px;
    padding: 10px;
    background: none;
    color: #ccc;
    border: none;
}
#modal-size .product__size-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#modal-size .product-size__content {
    height: 100%;
}
#modal-size .product__size-item {
    padding: 4px 12px;
    border: 2px solid #868695;
    border-radius: calc(var(--border-radius, 10px) / 2);
    text-align: center;
    width: calc(100%/3 - 4px);
    font-size: 14px;
}
#modal-size .product__size-item:hover {
    border: 2px solid var(--color-primary, #cb11ab);
}