/* --- iModal Component --- */
.lvd-modal-open                                             {overflow: hidden;}
.lvd-modal-hidden                                           {display: none !important;}

/* 1. Overlay & Base */
.lvd-cm-imodal                                              {--modal-duration: 300ms; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity var(--modal-duration) ease, visibility var(--modal-duration) ease;}
.lvd-cm-imodal.lvd-modal-active                             {opacity: 1; visibility: visible;}

/* 2. Backdrop */
.lvd-modal-backdrop                                         {position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.4); z-index: 1;}

/* 3. Dialog Wrapper */
.lvd-modal-dialog                                           {position: relative; z-index: 2; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 48px; pointer-events: none;}

/* 4. Content Box */
.lvd-modal-content                                          {position: relative; width: 100%; max-height: 100%; overflow-y: auto; background-color: var(--lvd-color-white); border-radius: var(--lvd-rounded-md); padding: 10px 48px 48px 48px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); margin: 0 auto; opacity: 0; transform: scale(0.95); transition: opacity var(--modal-duration) ease, transform var(--modal-duration) cubic-bezier(0.16, 1, 0.3, 1); pointer-events: auto; -webkit-overflow-scrolling: touch;}
.lvd-cm-imodal.lvd-modal-active .lvd-modal-content          {opacity: 1; transform: scale(1);}

/* 5. Close Button */
.lvd-modal-close                                            {position: sticky; top: 0; float: right; margin-top: 0; margin-right: -38px; width: 24px; height: 24px; border: none; padding: 0; cursor: pointer; background-color: var(--lvd-color-black); opacity: 1; transition: opacity 0.3s ease, transform 0.3s ease; z-index: 50; -webkit-mask-image: url('../assets/svg/bs-icons/x-circle-fill.svg'); mask-image: url('../assets/svg/bs-icons/x-circle-fill.svg'); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-position: center; mask-position: center;}
.lvd-modal-close:hover                                      {transform: rotate(90deg); opacity: 0.7;}

/* 6. Body Spacer */
.lvd-modal-body                                             {position: relative; clear: both; padding-top:24px;}

/* Sizes */
.lvd-modal-content.lvd-modal-sm                             {max-width: 480px;}
.lvd-modal-content.lvd-modal-md                             {max-width: 768px;}
.lvd-modal-content.lvd-modal-lg                             {max-width: 1024px;}
.lvd-modal-content.lvd-modal-full                           {max-width: 95vw; height: 90vh;}

/* --- Mobile Styles (Bm) --- */
@media (max-width: 767px) {
    .lvd-modal-dialog                                       {padding: 8px;}
    .lvd-modal-content                                      {width: 100%; max-height: 100%; padding: 10px 16px 16px 16px; background-color: var(--lvd-color-white); color: inherit;}
    .lvd-modal-close                                        {background-color: var(--lvd-color-black); margin-right: -6px;}
}