.modal-container {
    position: fixed;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    padding: 16px;
    box-sizing: border-box;
    backdrop-filter: blur(2px);
    background-color: #0e233c59;
}

.modal-container.show {
    display: flex;
}

.modal-container .modal {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: min(420px, calc(100vw - 32px));
    max-height: min(86vh, 900px);
    border-radius: 8px;
    padding: 20px 20px 16px;
    background-color: #fff;
    box-shadow: 0 20px 40px -12px rgb(0 0 0 / 28%);
    overflow: hidden;
}

.close-modal {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    padding: 0;
    color: #6a7895;
    background-color: #eef1f5;
    transition: .12s ease;
}

.close-modal:hover {
    cursor: pointer;
    color: #081237;
    background-color: #e2e7ee;
}

.modal-form {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(min(86vh, 900px) - 28px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
    box-sizing: border-box;
}

.form-title {
    text-align: center;
    margin: 4px 28px 4px 0;
    color: #081237;
}

.form-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

.form-wrapper,
.form-wrapper button {
    width: 100%;
}

.form-wrapper > label {
    font-size: 14px;
    color: #081237;
}

.form-wrapper input,
.form-wrapper select,
.form-wrapper textarea {
    background-color: #fff;
}

.form-wrapper input.danger {
    border: 2px solid #ff2e00;
}

.form-wrapper input.success {
    border: 2px solid #22970f;
}

.form-wrapper .datetime {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.form-wrapper .datetime .support-el {
    display: none;
    margin-bottom: 8px;
    color: #ff2e00;
    line-height: 110%;
}

.form-wrapper .datetime .support-el.danger {
    color: #ff2e00;
}

.form-wrapper .datetime .support-el.success {
    color: #22970f;
}

.form-wrapper .datetime .datetime-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.datetime .date {
    width: 60%;
}

.datetime .time {
    width: 35%;
}

/* Alert do modal: sticky no topo do formulário */
.modal-form > .alert,
.modal-form > #user-feedback-alert {
    position: sticky;
    top: 0;
    z-index: 5;
}
