/* Shared dashboard dialogs, in both left-to-right and right-to-left layouts. */
body .modal:not(.student-edit-dialog) .modal-dialog {
    width: calc(100% - 2rem);
    margin: 2rem auto;
}
body .modal:not(.student-edit-dialog) .modal-content {
    border: 1px solid #e9e5f5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(33, 28, 67, .2);
}
body .modal:not(.student-edit-dialog) .modal-dialog .modal-content .modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eeebf5;
    border-radius: 18px 18px 0 0;
    background: #faf9ff !important;
    color: #29263f;
}
body .modal:not(.student-edit-dialog) .modal-header .modal-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #29263f;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
body .modal:not(.student-edit-dialog) .modal-header .close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    margin: 0 !important;
    padding: 0;
    border-radius: 10px;
    color: #655bd0;
    background: #f0edff;
    opacity: 1;
    text-shadow: none;
}
body .modal:not(.student-edit-dialog) .modal-dialog .modal-content .modal-header .close span { color: inherit; font-size: 1rem; }
body .modal:not(.student-edit-dialog) .modal-header .close:hover { color: #fff; background: #7367f0; }
body .modal:not(.student-edit-dialog) .modal-header .close:focus-visible { outline: 2px solid #7367f0; outline-offset: 2px; }
body .modal:not(.student-edit-dialog) .modal-dialog .modal-content .modal-body { padding: 1.5rem; }
body .modal:not(.student-edit-dialog) .modal-dialog .modal-content .modal-footer {
    gap: .65rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #eeebf5;
    border-radius: 0 0 18px 18px;
    background: #faf9ff;
}
body .modal:not(.student-edit-dialog) .modal-footer > * { margin: 0; }
body .modal:not(.student-edit-dialog) .modal-body .form-group { min-width: 0; }
body .modal:not(.student-edit-dialog) .modal-body label { line-height: 1.5; }
body .modal:not(.student-edit-dialog) .modal-body .form-control { max-width: 100%; }
html[dir="rtl"] body .modal:not(.student-edit-dialog) .modal-content { text-align: right; }
/* This form uses native inputs without the legacy theme's helper elements. */
body .guardian-edit-modal .modal-dialog { max-width: 860px; }
body .guardian-edit-modal .modal-dialog .modal-content { overflow: hidden; }
body .guardian-edit-modal .modal-dialog .modal-content .modal-header { background: #fff !important; padding: 1.25rem 1.5rem; }
body .guardian-edit-modal .modal-dialog .modal-content .modal-header .close,
body .guardian-edit-modal .modal-dialog .modal-content .modal-header .close span { color: #655bd0 !important; }
body .guardian-edit-modal .modal-dialog .modal-content .modal-header .close:hover,
body .guardian-edit-modal .modal-dialog .modal-content .modal-header .close:hover span { color: #fff !important; }
body .guardian-edit-modal .modal-body .row { row-gap: 1rem; }
body .guardian-edit-modal .modal-body .form-group { margin-bottom: 0; }
body .guardian-edit-modal .modal-body .form-group > label { display: block; margin-bottom: .45rem; font-weight: 600; }
body .guardian-edit-modal .guardian-gender-options { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; min-height: 42px; }
body .guardian-edit-modal .guardian-gender-options .form-check { margin: 0; padding: .5rem .8rem; border: 1px solid #e6e2f6; border-radius: 9px; background: #faf9ff; }
body .guardian-edit-modal .guardian-reset-row { margin-top: 1rem; }
body .guardian-edit-modal .guardian-reset-row .form-check { margin: 0; }
body .guardian-edit-modal .modal-body .input-group { padding: 0; }
body .guardian-edit-modal .form-check .form-check-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 !important;
    cursor: pointer;
}
body .guardian-edit-modal .form-check .form-check-label input:is([type="radio"], [type="checkbox"]) {
    position: static;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0;
    opacity: 1;
    filter: none;
    accent-color: #7367f0;
}
body .guardian-edit-modal .modal-body .form-check-inline { margin-inline: 0; }
@media (max-width: 575.98px) {
    body .modal:not(.student-edit-dialog) .modal-dialog { width: calc(100% - 1rem); margin: .5rem auto; }
    body .modal:not(.student-edit-dialog) .modal-dialog .modal-content :is(.modal-header, .modal-body, .modal-footer) { padding: 1rem; }
    body .modal:not(.student-edit-dialog) .modal-footer { flex-wrap: wrap; }
}
