/*styling for modal form*/

.app-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.app-modal-overlay.hidden {
    display: none;
}

.app-modal-dialog {
    /*width: min(640px, 90vw);*/
    width: min(400px, 90vw);
    max-height: 85vh;
    overflow-y: auto;
    background: rgb(250,220,120);
    /*border-radius: 12px;*/
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    padding: 0;
    font-family: "Times New Roman", sans-serif;
}

.app-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*padding: 16px 20px;*/
    padding: 4px 5px;
    border-bottom: 1px solid #ddd;
}

.app-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

#app-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}

#app-modal-form {
    /*padding: 20px;*/
    padding: 5px;
}

#app-modal-body {
    display: grid;
    /*gap: 14px;*/
    gap: 4px;
}

.form-field {
    display: flex;
    flex-direction: column;
    /*gap: 6px;*/
    gap: 3px;
}

.form-field-label {
    font-weight: 600;
    /*margin-bottom: 6px;*/
    margin-bottom: 3px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.form-field input,
.form-field select,
.form-field textarea {
    /*padding: 10px 12px;*/
    padding: 5px 6px;
    font-size: 1rem;
    border: 1px solid #bbb;
    /*border-radius: 8px;*/
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
}

.form-help-text {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #555;
}

.form-error-text {
    margin-top: 6px;
    font-size: 0.9rem;
    color: #b00020;
    min-height: 1.2em;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
    border-color: #b00020;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    /*gap: 10px;*/
    gap: 5px;
    /*margin-top: 20px;*/
    margin-top: 10px;
    color: mediumslateblue;
}