/* >>> STYLE: 320 : owrx.ui.modal - 25.2.0 <<< */

/* owrx.ui.modal css */    

body.wrx-modals-active {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    touch-action: none;
    overscroll-behavior: none;
}

#wrxModalContainer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    max-width: 100dvw;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: backdrop-filter 0.3s ease;
}

.wrx-modals-active #wrxModalContainer {
    display: flex;
}

.wrx-modal {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    max-width: 100dvw;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    justify-content: flex-start;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-20px);
}

.wrx-modals-active .wrx-modal {
    opacity: 1;
    transform: translateY(0);
}

.wrx-modal-header {
    flex-grow: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: .2rem;
    width: 100%;
    max-width: 100dvw;
    background-color: rgba(255, 255, 255, .9);
    color: var(--primary);
    order: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.wrx-modal-header-title {
    flex-grow: 1;
    text-align: center;
    font-size: 1rem;
    cursor: default;
    font-weight: bold;
}

.wrx-modal-header button {
    background: none;
    border: 0px;
    margin-bottom: 0;
    color: var(--primary-l1);
    cursor: pointer;
    font-size: .9rem;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3rem .8rem;
}

.wrx-modal-header button:hover, .wrx-modal-header button:active {
    background-color: var(--primary-l1);
    color: var(--white);
}

.wrx-modal-header button i {
    padding: 0 .3rem 0 0;
    font-size: 1rem;
}

.wrx-modal-body {
    cursor: initial;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-y: hidden;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100dvw;
    pointer-events: auto;
    padding: 0;
    order: 2;
}

.wrx-modal-content {
    background-color: var(--white);
    /* padding: 1rem; */
    border-radius: 0;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); */
    width: auto;
    max-width: 100dvw;
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    cursor: initial;
    transition: opacity 0.3s ease;
}

.wrx-modal-content.fill-height {
    flex-grow: 1;
}

.wrx-modal-body-align-top {
    justify-content: flex-start;
}

/* -------------------------------------------------
   2. (Optional) Force top-alignment on narrow screens
   ------------------------------------------------- */
/* If you want to ensure that, even if JS hasn’t fired yet,
   <div class="wrx-modal-body wrx-modal-body-align-middle">
   doesn’t center on a < 480px viewport, you can override: */
   
@media (max-width: 479px) {
  .wrx-modal-body-align-middle {
    justify-content: flex-start !important;
  }
}

.wrx-modal-body-align-middle {
    justify-content: center;
}

.wrx-modal-body-align-bottom {
    justify-content: flex-end;
}

.wrx-modal-loading {
    text-align: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.wrx-modal-header {
    background-color: rgba(255, 255, 255, 1);
}

.wrx-modal-content.no-padding {
    padding: 0;
}

/* Additional styles for header positioning */
.wrx-modal-header[data-header-position="contentFloatTop"] {
    background-color: transparent;
}

.wrx-modal-header[data-header-position="contentFloatTop"] .wrx-modal-header-title {
    background-color: rgba(255, 255, 255, 0.9);
}

.wrx-modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 1);
    padding: 0;
    width: 100%;
    max-width: 100dvw;
    box-sizing: border-box;
    order: 3;
    min-height: .4rem;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    position: relative;
}