:root{
    --mdx-boder-radius: var(--bs-border-radius);
    --mdx-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");
}

.modalx-backdrop {position: fixed;inset: 0;background: rgba(0, 0, 0, 0.4);opacity: 0;transition: opacity 0.2s;}
.modalx-backdrop.show {opacity: 1;}
.modalx-container {position: fixed;top: 0;left: 0;transition: all 0.2s ease-in-out;opacity: 0;width: 100%;height: 100%;display: flex;align-items: center;justify-content: center;pointer-events: none;}
.modalx-container.show {opacity: 1;}
.modalx-header {display: flex;flex-shrink: 0;align-items: center;justify-content: space-between;padding: 12px 15px;border-bottom: 1px solid #eeeeee;}
.modalx-title{ font-size: 18px; font-weight: 500; }
.modalx-body { position: relative; flex: 1 1 auto; overflow-y: auto; }
.modalx-footer {display: flex;justify-content: flex-end;gap: 10px;padding: 12px 15px;border-top: 1px solid #eeeeee;}
.modalx-content { position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto; }
.modalx { background: #ffffff; border-radius: var(--mdx-boder-radius); box-shadow: 0 10px 30px rgba(0,0,0,0.3); overflow: hidden; pointer-events: auto; }
.modalx-sm{ width: 300px; }
.modalx-md{ width: 500px; max-width: 100%; }
.modalx-lg{ width: 800px; max-width: 100%; }
.modalx-xl{ width: 1140px; max-width: 100%; }
.modalx-xxl{ width: 1280px; max-width: 100%; }
.modalx-w-200{ width: 200px; max-width: 100%; }
.modalx-w-250{ width: 250px; max-width: 100%; }
.modalx-w-300{ width: 300px; max-width: 100%; }
.modalx-w-400{ width: 400px; max-width: 100%; }
.modalx-w-500{ width: 500px; max-width: 100%; }
.modalx-w-600{ width: 600px; max-width: 100%; }
.modalx-w-700{ width: 700px; max-width: 100%; }
.modalx-w-800{ width: 800px; max-width: 100%; }
.modalx-w-900{ width: 800px; max-width: 100%; }
.modalx-w-1000{ width: 100px; max-width: 100%; }
.modalx-w-1100{ width: 1100px; max-width: 100%; }
.modalx-w-1200{ width: 1200px; max-width: 100%; }
.modalx-w-1300{ width: 1300px; max-width: 100%; }
.modalx-w-1400{ width: 1400px; max-width: 100%; }
.modalx-w-1500{ width: 1500px; max-width: 100%; }
.modalx-w-1600{ width: 1600px; max-width: 100%; }
.modalx-min-200{ min-width: 200px; max-width: 100%; }
.modalx-min-250{ min-width: 250px; max-width: 100%; }
.modalx-min-300{ min-width: 300px; max-width: 100%; }
.modalx-min-400{ min-width: 400px; max-width: 100%; }
.modalx-min-500{ min-width: 500px; max-width: 100%; }
.modalx-min-600{ min-width: 600px; max-width: 100%; }
.modalx-min-700{ min-width: 700px; max-width: 100%; }
.modalx-min-800{ min-width: 800px; max-width: 100%; }
.modalx-min-900{ min-width: 800px; max-width: 100%; }
.modalx-min-1000{ min-width: 100px; max-width: 100%; }
.modalx-min-1100{ min-width: 1100px; max-width: 100%; }
.modalx-min-1200{ min-width: 1200px; max-width: 100%; }
.modalx-min-1300{ min-width: 1300px; max-width: 100%; }
.modalx-min-1400{ min-width: 1400px; max-width: 100%; }
.modalx-min-1500{ min-width: 1500px; max-width: 100%; }
.modalx-min-1600{ min-width: 1600px; max-width: 100%; }
.modalx-full{ width: 100vw; height: 100vh; border-radius: 0; position: relative; display: flex; flex-direction: column; pointer-events: auto;}
.modalx-full>form{ height: 100%; display: flex; flex-direction: column; pointer-events: auto;}
.modalx-full-spaced{ width: calc(100vw - 50px); height: calc(100vh - 50px); position: relative; display: flex; flex-direction: column; pointer-events: auto;}
.modalx-full-spaced>form{ height: 100%; display: flex; flex-direction: column; pointer-events: auto;}
.modalx-btn-close {box-sizing: content-box;width: 14px;height: 14px;padding: 7px 7px;margin: -8px -7px -7px auto;color: #000;border: 0;border-radius: var(--mdx-boder-radius);opacity: 0.5;transition: all 0.2s ease-in-out;background: transparent var(--mdx-btn-close-bg) center/14px auto no-repeat;}
.modalx-btn-close:hover{ opacity: 1; background-color: #f9f9f9; }
.modalx-type-icon{ text-align: center; margin-bottom: 15px; font-size: 60px; }

.modalx-loading { overflow: hidden; position: fixed; background-color: rgba(255, 255, 255, 0.3); top: 0; left: 0; right: 0; bottom: 0; z-index: 9998;}
.modalx-loading:after { content: ""; width: 40px; height: 40px; position: absolute; left: 50%; top: 50%; border-radius: 50%; margin: -20px 0 0 -20px; font-size: 10px; border-top: 5px solid #dee2e6; border-right: 5px solid #dee2e6; border-bottom: 5px solid #dee2e6; border-left: 5px solid var(--bs-primary); transform: translateZ(0); animation: ModalXSpinner 1.1s infinite linear; z-index: 9999; }

.modalx-box-loading { overflow: hidden; position: relative; }
.modalx-box-loading:before { content: ""; background-color: rgba(255, 255, 255, 0.3); position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 9998; }
.modalx-box-loading:after { content: ""; width: 40px; height: 40px; position: absolute; left: 50%; top: 50%; border-radius: 50%; margin: -20px 0 0 -20px; font-size: 10px; border-top: 5px solid #dee2e6; border-right: 5px solid #dee2e6; border-bottom: 5px solid #dee2e6; border-left: 5px solid var(--bs-primary); transform: translateZ(0); animation: ModalXSpinner 1.1s infinite linear; z-index: 9999; }

body.modalx-open { overflow: hidden; }

@keyframes ModalXSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
