* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

img {
    width: 100%;
}

ul {
    list-style-type: none;
}

a {
    text-decoration: none;
}

button {
    cursor: pointer;
}

.small {
    font-size: 80%;
}

.center {
    text-align: center;
}

.nowrap {
    white-space: nowrap;
}

/* Input block */
.input-block {
    position: relative;
}

/* Dropdown */

.input-block__dropdown {
    position: absolute;
    display: none;
    top: 80px;
    left: 0;
    width: 100%;
    border: 1px solid var(--color-text);
    border-radius: 8px;
    background: var(--color-white);
    padding: 0;
    overflow-y: auto;
    z-index: 1;
}

.input-block__dropdown-list {
    max-height: 200px;
    overflow-y: auto;
    z-index: 1;
}

.input-block__dropdown-list::-webkit-scrollbar {
    z-index: -1;
    width: 6px;
}

.input-block__dropdown-list::-webkit-scrollbar-track {
    background: var(--color-white);
}

.input-block__dropdown-list::-webkit-scrollbar-thumb {
    background-color: var(--color-accent);
}

.input-block__dropdown.is-active {
    display: block;
    padding: 10px;
}

.input-block__dropdown-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-grey);
    cursor: pointer;
    overflow: hidden;
}

.input-block__dropdown-item:not(.empty):hover {
    background: var(--color-grey);
}

.input-block__dropdown-item.empty {
    cursor: default;
    color: green;
}

.input-block__dropdown-item:first-child {
    border-top: none;
}

.input-block__select {
    width: 100%;
    height: 50px;
    font-size: 18px;
    border-radius: 6px;
    outline: none;
    padding: 0 16px;
}

.input-block__select.is-error {
    border-color: var(--color-error);
}

    /* Modal */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 300;
    display: none;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.5);;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.modal.is-active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    display: flex;
}

.modal__inner {
    background-color: var(--color-white);
    width: 100%;
    max-width: 600px;
    max-height: 95%;
    overflow: auto;
    border-radius: 4px;
    padding: 24px 40px 32px;
    margin: auto;
    position: relative;
}

.modal__close {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 20px;
    right: 20px;
    cursor: pointer;
    transform-origin: center center;
    transition: var(--transition);
}

.modal__close:after {
    content: '';
    position: absolute;
    width: 200%;
    height: 160%;
    left: -8px;
    top: -9px;
}

.modal__close:hover {
    transform: rotate(180deg);
    top: 22px;
    transition: var(--transition);
}

.modal__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 32px;
    padding-right: 16px;
}

.modal__title--product {
    margin-bottom: 16px;
}

.modal-success__img {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.modal-success__img img {
    width: 100px;
}

.img-block {
    display: block;
    position: relative;
    width: 100%;
}

.img-block img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    -o-object-fit: contain;
    object-fit: contain;
    -o-object-position: center;
    object-position: center;
    z-index: 1;
    width: 100%;
}

.img-block:after {
    content: '';
    position: relative;
    display: block;
    width: 100%;
    padding-top: 66.667%;
}

/* Table */

.table-block {
    overflow-x: auto;
}


.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    font-weight: 500;
}

.table th, .table td {
    padding: 8px 16px;
    border: 1px solid #CCC;
    background: #FFF;
}

/* Tabs */

.tab {
    cursor: pointer;
}

.tab-block {
    display: none;
}

.tab-block.is-active {
    display: block;
}

.is-loading {
    position: relative;
    transition: all var(--transition-quick);
    pointer-events: none;
    opacity: .5;
}

.is-loading:after {
    box-sizing: border-box;
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 100%;
    border-width: 5px;
    border-style: solid;
    border-color: transparent;
    border-top-color: var(--color-error);
    opacity: 1;
    left: 50%;
    top: 50%;
    margin-top: -15px;
    margin-left: -15px;
    z-index: 5;
    animation-name: rotation;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 576px) {
    .input-block__dropdown {
        top: 100px;
        padding-right: 0;
    }

    .input-block__dropdown-item {
        padding: 12px 0;
        font-size: 14px;
    }

}
