/*
 * Look of the older Bootstrap modals (class .mymd_cmmnModal) that are not on the design system yet
 * (patient dashboard: edit family member, cancel order). Matches the shared modals in layouts/modals.blade.php.
 * Sizes in px because the site sets html { font-size: 62.5% }. Remove once these modals move to resources/ui.
 */
.mymd_cmmnModal .modal-content {
    position: relative;
    border: 0;
    border-radius: 20px;
    padding: 28px !important;
    box-shadow: 0 20px 50px rgba(47, 14, 14, .18);
    font-family: 'Inter', Arial, sans-serif;
    color: #3A2626;
}

.mymd_cmmnModal .modal-body {
    padding: 0 !important;
}

.mymd_cmmnModal .modal-header {
    border: 0;
}

.mymd_cmmnModal h1,
.mymd_cmmnModal h2,
.mymd_cmmnModal h3 {
    font-family: inherit;
    font-weight: 700;
    color: #3A2626;
}

/* fields */
.mymd_cmmnModal .form-floating > .form-control,
.mymd_cmmnModal .form-floating > .form-select,
.mymd_cmmnModal .form-control {
    border: 1px solid #F1EBEB;
    border-radius: 12px;
    font-size: 15px;
    color: #3A2626;
    background-color: #fff;
    box-shadow: none;
}

.mymd_cmmnModal .form-control:focus,
.mymd_cmmnModal .form-select:focus {
    border-color: #EA3639;
    box-shadow: 0 0 0 3px rgba(234, 54, 57, .12);
}

.mymd_cmmnModal .form-floating > label {
    color: #6E6A6B;
    font-size: 13px;
}

.mymd_cmmnModal textarea.form-control {
    min-height: 110px;
}

.mymd_cmmnModal .form-check-input:checked {
    background-color: #EA3639;
    border-color: #EA3639;
}

.mymd_cmmnModal .radio-inline input[type="radio"] {
    accent-color: #EA3639;
}

/* buttons */
.mymd_cmmnModal .cmnBtn {
    min-height: 48px;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.mymd_cmmnModal .cmnBtn.bgColorRed {
    background: #EA3639;
}

.mymd_cmmnModal .cmnBtn.bgColorRed:hover {
    background: #C92A2D;
}

/* "Close" style secondary button */
.mymd_cmmnModal .cmnBtn.bgColorRed-2 {
    background: #fff;
    border: 1px solid #F1EBEB;
    color: #3A2626;
}

.mymd_cmmnModal .cmnBtn.bgColorRed-2:hover {
    border-color: #F6D5D5;
    color: #EA3639;
}

.mymd_cmmnModal .btn_groupHalf {
    gap: 12px;
}

/* loading overlay */
.mymd_cmmnModal .overlayLoader {
    border-radius: 20px;
}

.modal-backdrop.show {
    opacity: .45;
}

/* ---------- Alert dialogs (SweetAlert 1: swal("", "...", "error")) ---------- */
.sweet-overlay {
    background-color: rgba(47, 14, 14, .45) !important;
}

.sweet-alert {
    width: min(420px, calc(100vw - 32px)) !important;
    margin-left: 0 !important;
    transform: translateX(-50%);
    left: 50% !important;
    padding: 28px 28px 24px !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(47, 14, 14, .18) !important;
    font-family: 'Inter', Arial, sans-serif !important;
}

.sweet-alert h2 {
    margin: 12px 0 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #3A2626 !important;
}

.sweet-alert p {
    margin-top: 8px !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    color: #6E6A6B !important;
}

.sweet-alert .sa-icon {
    transform: scale(.75);
    margin: 0 auto 4px !important;
}

.sweet-alert .sa-button-container {
    margin: 20px 0 0 !important;
}

.sweet-alert button {
    min-width: 120px;
    height: 46px;
    margin: 0 6px !important;
    padding: 0 22px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.sweet-alert button.confirm,
.sweet-alert button.confirm:hover {
    background-color: #EA3639 !important;
    color: #fff !important;
}

.sweet-alert button.confirm:hover {
    background-color: #C92A2D !important;
}

.sweet-alert button.cancel {
    background: #fff !important;
    border: 1px solid #F1EBEB !important;
    color: #3A2626 !important;
}

.sweet-alert button.cancel:hover {
    border-color: #F6D5D5 !important;
    color: #EA3639 !important;
}
