
.modal__overlay {
    position: fixed;
    top: 0;
    left: var(--x-modal-menu-offset, 0px);
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 991.98px) {
    .modal__overlay {
        left: 0;
    }
}

.modal__container {
    background: #fff;
    padding: 20px;
    /*max-width: 500px;*/
    max-height: 96vh;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-sizing: border-box;
}

.modal__draggable {
    z-index: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3em;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*position: absolute;*/
    /*width: 100%;*/
}

.modal__title {
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--blue);
    box-sizing: border-box;
}

.modal__close {
    background: transparent;
    border: 0;
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    z-index: 1000;
}

.modal__header .modal__close:before {
    content: "\2715";
}

.modal__content {
    /*margin-top: 1rem;*/
    /*margin-bottom: 1rem;*/
    color: rgba(0, 0, 0, .8);
    min-height: 0;
    overflow: visible;
}

.modal__content-fit-fallback {
    width: 100%;
    max-width: 360px;
    padding: 20px 10px 10px;
    box-sizing: border-box;
    line-height: 1.5;
}

.modal__content.spinner-bg {
    background: url("/icons?icon=spinner") no-repeat center center;
}

.current-calendar-x-modal .modal__overlay {
    box-sizing: border-box;
    padding-block: 2vh;
    padding-block: 2dvh;
}

.current-calendar-x-modal .modal__container {
    box-sizing: border-box;
    width: 500px;
    max-width: calc(100vw - 32px);
    max-height: calc(96vh - 4px) !important;
    max-height: calc(96dvh - 4px) !important;
    padding: 0;
    overflow: hidden !important;
}

.current-calendar-x-modal .modal__header {
    display: none;
}

.current-calendar-x-modal .modal__content {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    overflow: hidden;
}

.current-calendar-x-modal__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: calc(96vh - 4px);
    max-height: calc(96dvh - 4px);
    overflow: hidden;
}

.current-calendar-x-modal__preview {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0.5em;
    overflow: hidden;
}

.current-calendar-x-modal__preview .loading-mask {
    position: absolute;
    inset: 0.5em;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.66);
    backdrop-filter: blur(2px);
    cursor: progress;
}

.current-calendar-x-modal__preview .loading-mask[hidden] {
    display: none;
}

.current-calendar-x-modal__preview .loading-mask__spinner {
    width: 48px;
    height: 48px;
    background: url("/icons?template=spinner&color=4B82BC&size=48") no-repeat center center;
    background-size: 48px 48px;
}

.current-calendar-x-modal__frame {
    display: block;
    flex: 1 1 auto;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: calc(96vh - 89px);
    max-height: calc(96dvh - 89px);
    margin: 0;
    box-shadow: 0 3px 12px rgba(25, 41, 72, 0.16);
}

.current-calendar-x-modal__footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--gray);
    background: #fff;
}

.current-calendar-x-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid color-mix(in srgb, var(--blue) 18%, white);
    border-radius: 6px;
    background: #fff;
    color: #24324a;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
}

.current-calendar-x-modal__close:hover,
.current-calendar-x-modal__close:focus {
    background: color-mix(in srgb, var(--blue) 8%, white);
    color: #24324a;
}

.current-calendar-x-modal__close:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.x-edit-modal-field-modal .modal__overlay {
    background: rgba(25, 41, 72, 0.24);
}

.x-edit-modal-field-modal .modal__container {
    width: 520px;
    max-width: calc(100vw - 32px);
    padding: 0;
    border: 1px solid #dfe6f1;
    border-radius: 6px;
    box-shadow: 0 18px 48px rgba(25, 41, 72, 0.16);
}

.x-edit-modal-field-modal .modal__content {
    padding: 0;
}

.x-edit-modal-form {
    --x-edit-border: #dfe6f1;
    --x-edit-text: #24324a;
    --x-edit-muted: #6f7c91;
    --x-edit-primary: #2196f3;
    width: 520px;
    max-width: calc(100vw - 32px);
    padding: 24px;
    color: var(--x-edit-text);
    box-sizing: border-box;
}

.x-edit-modal-form * {
    box-sizing: border-box;
}

.x-edit-modal-form .x-edit-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
}

.x-edit-modal-form .x-edit-modal-desc {
    margin: 6px 0 18px;
    color: var(--x-edit-muted);
    font-size: 14px;
}

.x-edit-modal-form .form-label-group {
    margin-bottom: 0;
}

.x-edit-modal-form .x-form-textarea {
    min-height: 140px;
    border: 1px solid #cfd8e6;
    border-radius: 4px;
    color: var(--x-edit-text);
    font-size: 14px;
    line-height: 1.45;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.x-edit-modal-form .x-form-textarea:focus {
    border-color: var(--x-edit-primary);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.12);
}

.x-edit-modal-form .x-form-textarea-label {
    background: #fff !important;
    color: var(--x-edit-muted) !important;
}

.x-edit-modal-form .x-edit-modal-legend {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px dashed #b7c7dc;
    border-radius: 8px;
    background: #f9fbff;
    color: var(--x-edit-muted);
    font-size: 13px;
    line-height: 1.35;
}

.x-edit-modal-form .x-edit-modal-legend:empty {
    display: none;
}

.x-edit-modal-form .x-edit-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.x-edit-modal-form .x-edit-modal-actions .btn {
    min-width: 96px;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
}

.x-edit-modal-form .x-edit-modal-actions .btn-close {
    border-color: var(--x-edit-border);
    color: var(--x-edit-text);
    background: #fff;
}

.x-edit-modal-form .x-edit-modal-actions .btn-submit {
    border-color: var(--x-edit-primary);
    background: var(--x-edit-primary);
    color: #fff;
}

.x-edit-modal-form .x-edit-modal-actions .btn-submit:hover {
    background: #1976d2;
}

.x-edit-modal-form .errors {
    margin-top: 10px;
    color: #ea5455;
    font-size: 13px;
}

@media (max-width: 560px) {
    .x-edit-modal-form {
        padding: 20px 16px;
    }

    .x-edit-modal-form .x-edit-modal-actions {
        flex-direction: column-reverse;
    }

    .x-edit-modal-form .x-edit-modal-actions .btn {
        width: 100%;
    }
}

.modal__btn {
    /*font-size: .875rem;*/
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
    background-color: #e6e6e6;
    color: rgba(0, 0, 0, .8);
    border-radius: .25rem;
    border-style: none;
    border-width: 0;
    cursor: pointer;
    -webkit-appearance: button;
    text-transform: none;
    overflow: visible;
    margin: 0;
    will-change: transform;
    -moz-osx-font-smoothing: grayscale;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    transition: -webkit-transform .25s ease-out;
    transition: transform .25s ease-out;
    transition: transform .25s ease-out, -webkit-transform .25s ease-out;
}

.modal__btn:focus, .modal__btn:hover {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
}

.modal__btn-primary {
    background-color: #00449e;
    color: #fff;
}


/**************************\
  Demo Animation Style
\**************************/
@keyframes mmfadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes mmfadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes mmslideIn {
    from {
        transform: translateY(15%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes mmslideOut {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-10%);
    }
}

.micromodal-slide {
    display: none;
}

.micromodal-slide.is-open {
    display: block;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
    animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
    animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
    animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
    animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
    will-change: transform;
}

.modal-width-400 {
    max-width: 80vw;
    width: 400px;
}

.modal-width-600 {
    max-width: 80vw;
    width: 600px;
}
