/** Modal **/
.js-modal-overlay {
    z-index: 999;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    opacity: 0;
}

.js-modal-overlay.is-show {
    visibility: visible;
    opacity: 1;
}

.overlay-white {
    background-color: rgba(255, 255, 255, 0.6);
}

.overlay-black {
    background-color: rgba(0, 0, 0, 0.6);
}

.modal {
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    margin: 0 auto;
    min-width: 360px;
    max-width: 600px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
    background-color: #fff;
    border-radius: 10px;
    transition: .3s all;
    zoom: 1.05;
    overflow: hidden;
}

.modal[data-modal='buy-success'] .modal-accept__subtitle {
    max-width: 350px;
}

.modal.is-show {
    top: 20%;
    visibility: visible;
    opacity: 1;
}

.modal__close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 14px;
    height: 14px;
    background: url("../img/icon-cross.svg") no-repeat;
    background-size: cover;
    transition: .3s all;
    cursor: pointer;
}

.modal__close:hover {
    transform: rotate(90deg);
}

@media (max-width: 767px) {
    .modal__close {
        position: relative;
        top: initial;
        right: initial;
        order: 1;
        height: 55px;
        width: 55px;
        background-size: 13px 20px;
        background-position: center;
        background-color: #ff9c4a;
        background-image: url("data:image/svg+xml,%3Csvg width='13' height='20' viewBox='0 0 13 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18L3 10L11 2' stroke='white' stroke-width='3'/%3E%3C/svg%3E%0A");
    }

    .modal__close:hover {
        transform: none;
        background-color: #ff9c4a;
    }
}

@media (max-width: 767px) {
    .modal.is-show {
        top: 0;
        left: 0;
    }
}

@media (max-width: 767px) {
    .modal {
        min-width: auto;
        width: 100%;
        left: -100%;
        top: 0;
        transform: none;
        max-width: unset;
        max-height: 100%;
        overflow-y: auto;
        height: 100%;
        padding-top: 70px;
        border: none;
        border-radius: 0;
    }
}

.modal__header {
    padding: 45px 0 0 0;
    background-color: #fff;
    margin-bottom: 15px;
}

@media (max-width: 767px) {
    .modal__header {
        display: flex;
        align-items: center;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        justify-content: flex-start;
        z-index: 20;
        border-bottom: 1px solid #E5E5E5;
    }
}

.modal__title {
    margin: 0;
    text-align: center;
    color: #333333;
    font-weight: bold;
    font-size: 30px;
}

@media (max-width: 767px) {
    .modal__title {
        order: 2;
        margin-left: 18px;
        font-size: 22px;
        text-align: left;
    }
}

.modal__body {
    padding: 0 26px 26px;
}

@media (max-width: 767px) {
    .modal__body {
        padding-bottom: 70px;
        padding-top: 0;
    }
}

.modal__footer {
    padding: 26px;
    border-top: 1px solid rgba(215, 222, 228, 0.5);
}

.modal__footer p {
    margin: 0 0 10px;
}

.modal-rest {
    font-size: 15px;
}

.modal-rest tr {
    display: block;
}

.modal-rest tr:not(:last-child) {
    padding-bottom: 30px;
}

.modal-rest td {
    display: inline-block;
}

.modal-rest td:first-child {
    width: 140px;
    margin-right: 20px;
}

.modal-rest td:last-child {
    font-size: 13px;
    color: #565b61;
}

.modal-rest td.rest-on {
    color: #009933;
}

.modal-form {
    /*max-width: 450px;*/
}

.modal__body .modal-form textarea {
    width: 100%;
    height: 100px;
    resize: none;
    border-radius: 20px;
    line-height: 1.4em;
    padding: 5px 20px;
}

.modal-form__grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.modal-form__grid.hidden,
.modal-form__grid .hidden {
    display: none !important;
}

@media (max-width: 767px) {
    .modal-form__grid {
        margin-bottom: 0;
    }

    .modal__body .modal-form textarea {
        height: 80px;
    }
}

.modal-form__grid .grid-item {
    display: inline-block;
    position: relative;
}

.modal-form__grid .grid-item span.error {
    display: none;
    position: absolute;
    color: darkred;
    left: 0;
    top: 100%;
}

.modal-form__grid textarea,
.modal-form__grid input,
.modal-form__grid .grid-item {
    width: 100%;
}

.modal-form__grid.grid-2 .grid-item {
    width: 49%;
}

.modal-form__grid.grid-3 .grid-item {
    width: 32%;
}

@media (max-width: 767px) {
    .modal-form__grid input,
    .modal-form__grid textarea,
    .modal-form__grid.grid-2 .grid-item,
    .modal-form__grid.grid-3 .grid-item {
        width: 100%;
    }

    .modal-form__grid .grid-item,
    .modal-form__grid.grid-2 .grid-item,
    .modal-form__grid.grid-3 .grid-item {
        margin-bottom: 10px;
    }
}

.modal__body .modal-form__field {
    padding: 0 20px;
    line-height: 43px;
    border: 1px solid #C3BABA;
    background-color: #ffffff;
    outline: none;
    font-size: 13px;
    color: #777575;
    height: auto;
    border-radius: 50px;
}

.modal__body .modal-form__field.error {
    border-color: crimson;
}

.modal__body .modal-form__field::-webkit-input-placeholder {
    font-size: 13px;
    color: #777575;
    font-weight: 400;
}

.modal__body .modal-form__field::-moz-placeholder {
    font-size: 13px;
    color: #777575;
    font-weight: 400;
}

.modal__body .modal-form__field:-ms-input-placeholder {
    font-size: 13px;
    color: #777575;
    font-weight: 400;
}

.modal__body .modal-form__field:-moz-placeholder {
    font-size: 13px;
    color: #777575;
    font-weight: 400;
}

@media (max-width: 480px) {
    .modal__body .modal-form__field {
        width: 100%;
    }
}

.modal-form__btn {
    background-color: #ff8a02;
    display: block;
    padding: 13px 17px;
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    margin: 20px auto 0;
}

.modal-form__btn:hover {
    background-color: #f28200;
}

@media (max-width: 767px) {
    .modal-form__btn {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
    }

    .modal__body form {
        /*padding-bottom: 60px;*/
    }
}

.modal-descr {
    font-size: 14px;
}

.modal-descr__block {
    margin-bottom: 15px;
}

.modal-descr__title {
    margin: 0;
    font-weight: 700;
}

.modal-descr__subtitle {
    margin: 2px 0 0;
}

.modal-accept {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 40px 0;
    width: 100%;
}

.modal-accept .modal-accept__icon {
    display: block;
    background: url("../img/icon-check-modal.svg") 0 0 no-repeat;
    width: 54px;
    height: 54px;
    margin: 0 auto;
}

.modal-accept .modal-error__icon {
    display: block;
    background: url("../img/icon-error-modal.svg") 0 0 no-repeat;
    width: 54px;
    height: 54px;
    margin: 0 auto;
    background-size: contain;
}

@media (max-width: 767px) {
    .modal-accept {
        padding: 20px;
        text-align: center;
        display: block;
    }
}

.modal-accept .modal__title {
    font-size: 20px;
    font-weight: 700;
    width: 100%;
    margin: 14px 0 0;
    text-transform: none;
}

.modal-accept .modal__body {
    color: #565b61;
    font-size: 15px;
    font-weight: 400;
    max-width: 280px;
    margin: 0 auto 0;
    padding: 10px;
}

.modal-accept .modal__body a {
    color: #165CBE;
}

.modal-tip {
    padding: 40px 20px;
}

.modal-tip__text {
    margin: 15px 0;
    max-width: 300px;
}

.modal-accept .modal__close {
    position: absolute;
    top: 30px;
    right: 30px;
}

@media (max-width: 767px) {
    .modal-accept .modal__close {
        left: 0;
        top: 0;
    }
}

i.m {
    position: absolute;
    font-size: 60%;
    font-style: normal;
    -webkit-transform: translateY(-20%);
    transform: translateY(-20%);
}

div[data-modal-container] {
    display: none;
}