/* Modal */
.w3-modal {
    background-color: rgba(0, 0, 0, 0.4);
    font-size: 1rem;
}

/* content and button background color */
.w3-modal .w3-modal-content, w3-modal .w3-btn {
    background-color: var(--mb-modalwindow-color);
}

/* border */
.w3-modal .w3-modal-content.w3-border {
    border: 1px solid var(--mb-modal-border) !important;
    box-shadow: 0px 0px 2px 2px var(--mb-modal-border);
}

.w3-modal-content footer {
    border-top: 1px solid var(--mb-modal-border);
}

.w3-modal-content header {
    border-bottom: 1px solid var(--mb-modal-border);
}

/* header */
.w3-modal header {
    color: var(--mb-font-color);
}

/* close button */
.w3-modal header span.w3-button {
    padding: 4px 8px;
    font-weight: 600;
}

.w3-modal header span.w3-button:hover {
    background-color: transparent !important;
    color: var(--mb-icon-hover-color) !important;
    transform: scale(1.2);
}

/* buttons */
.w3-modal .w3-btn {
    padding: 4px 16px !important;
    min-width: 7.5rem;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}

/* table */
.w3-modal table td, .w3-modal table th {
    padding: 2px 2px 2px 8px;
}

.w3-modal .w3-modal-content {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    max-height: 475px;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

.w3-modal .w3-modal-content header, .w3-modal-content footer {
    font-family: var(--mb-font);
    font-size: 1.5rem;
    padding: 5px 5px 5px 16px;
    font-weight: 400;
    flex: 0 0 auto;
}

.w3-modal .w3-modal-content > div {
    overflow-y: auto;
    padding: 5px 16px 5px 16px;
    flex: 0 1 auto;
    margin-bottom: 16px;
    min-height: 75px;
}

.w3-modal .w3-panel {
    margin: 0;
}

/* Margin above table */
.w3-modal .w3-table {
    margin-top: 10px;
}