.modal-substrate {
    background-color: #1d1d1d88;
    position: fixed;
    display: flex;
    overflow: hidden;
    z-index: 10;
    justify-content: center;
    align-items: stretch;
    width: 1px;
    height: 1px;
    top: -100vw; 
    left: -100vh;
}

.modal-substrate.active {
    width: 100vw;
    height: 100vh;
    top: 0vw; 
    left: 0vh;
    opacity: 1;
    animation: opening 0.5s ease;
}
@keyframes opening {
    0% {opacity: 0;}
    100% { opacity: 1;}
}

.modal-substrate.closed {
    width: 1px;
    height: 1px;
    top: -100vw; 
    left: -100vh;
    opacity: 0;
    animation: closing 0.5s ease;
}

@keyframes closing {
    0% { opacity: 1; width: 100vw;
        height: 100vh;
        top: 0vw; 
        left: 0vh;}
    99% { opacity: 0; width: 100vw;
            height: 100vh;
            top: 0vw; 
            left: 0vh;}
    100% { opacity: 0; width: 1px;
        height: 1px;
        top: -100vw; 
        left: -100vh;}
}

.modal-header-title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 2px 2px 10px 2px;
}

.modal-window-table {
    /* Иногда плохо работает */
    overflow: hidden;

}

.modal-window-container {
    padding: 2vh;
    background-color: #00000000;
    position: fixed;
    display: flex;
    z-index: 10;
    justify-content: center;
    align-items: stretch;
    width: 100vw;
    height: 100vh;
    overflow: auto;
}

.modal-window-container.active {
    width: 100vw;
    height: 100vh;
    top: 0vw; 
    left: 0vh;
    opacity: 1;
    animation: opening 0.5s ease;
}

.modal-window-container.closed {
    width: 1px;
    height: 1px;
    top: -100vw; 
    left: -100vh;
    opacity: 0;
    animation: closing 0.5s ease;
}

.modal-window-close-btn {
    width: 24px;
    height: 24px;
    border-radius: 15px;
    border: 1px solid #afafaf;
    padding: 0px;
    background-color: #ebebeb;
}

.modal-window-close-btn:hover {
    background-color: #cccccc;
}

.modal-window-close-btn::after {
    margin: 0px;
    font-size: 12px;
    content: "✖";
    /* content: "❌"; */
}

.modal-header {
    display: flex;
    flex-direction: row;
    justify-content:space-between;
    align-items: center;
}

.modal-container {
    display: flex;
    /* background-color: #ededed; */
    flex-direction: column;
    justify-content: space-between;
    /* justify-content: center; */
    /* margin: auto; */
    /* padding: 10px; */
    /* border-radius: 5px; */
    max-width: 90vw;
    min-width: 90vw;
    z-index: 20;
}

.modal-table {
    background-color: white;
    padding: 10px;
    border: 10px solid #ededed;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.modal-table input[type="checkbox"] {
    accent-color:#DF3D4A;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.modal-table input[type="checkbox"].wrong {
    accent-color:#9b5b5bd8;
}

.modal-table input[type="checkbox"].done {
    accent-color:#27422985;
}

.modal-table input[type="text"] {
    min-width: 200px;
    height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    background: none;
    outline: none;
    caret-color: black;
    border: 1px solid #2E343C1F;
    background-color: #2E343C0A;
}

.modal-table input[type="number"] {
    min-width: 100px;
    width: fit-content;
    height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    background: none;
    outline: none;
    caret-color: black;
    border: 1px solid #2E343C1F;
    background-color: #2E343C0A;
}

.modal-table input[type="text"].wrong {
    border: 1px solid #42272785;
    background-color: #52101030;
}

.modal-table input[type="text"].done {
    animation: modal-table-input-done 0.5s ease-in;
}

.modal-table input[type="number"].wrong {
    border: 1px solid #42272785;
    background-color: #52101030;
}

.modal-table input[type="number"].done {
    animation: modal-table-input-done 0.5s ease-in;
}


@keyframes modal-table-input-done {
    from {
        border: 1px solid #27422985;
        background-color: #10521330;
    }
    to {
        border: 1px solid #2E343C1F;
        background-color: #2E343C0A;
    }
}


.modal-table textarea {
    border: 1px solid #2E343C1F;
    min-width: 200px;
    height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    background: none;
    outline: none;
    caret-color: black;
    background-color: #2E343C0A;
}

.modal-table textarea.wrong {
    border: 1px solid #42272785;
    background-color: #52101030;
}

.modal-table textarea.done {
    animation: modal-table-input-done 0.5s ease-in;
}

.modal-table input[type="list"] {
    border: 1px solid #2E343C1F;
    min-width: 200px;
    height: 36px;
    padding: 6px 10px;
    border-radius: 8px;
    background: none;
    outline: none;
    caret-color: black;
    background-color: #2E343C0A;
}

.modal-table input[type="list"].wrong {
    border: 1px solid #42272785;
    background-color: #52101030;
}

.modal-table input[type="list"].done {
    animation: modal-table-input-done 0.5s ease-in;
}


.modal-tab {
    display: none;
    /* animation: fadeIn 0.2s ease-in; */
}


.modal-tab input[type="checkbox"] {
    accent-color:#DF3D4A;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.modal-tab input[type="checkbox"].wrong {
    accent-color:#9b5b5bd8;
}

.modal-tab input[type="checkbox"].done {
    accent-color:#27422985;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-tab.active {
    display: block;
}


.address-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.contract-container {
    display: flex;
    flex-direction: column;
}

.modal-table input.readonly {
    caret-color: rgba(255, 255, 255, 0);
    background-color: #7c7c7c79;
}
