/* onv-modal.css start */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}
.onv-modal {
    display: none;
    position: fixed;
    z-index: 9980;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    overflow: hidden; /* Tambahan untuk mencegah scroll */
}

.onv-modal-wrapper {
    margin: 1.75rem auto;
    max-width: 600px;
}

.onv-modal-content {
    background-color: var(--onv-surface, #ffffff);
    border: 1px solid var(--onv-border, #e6e8ee);
    border-radius: var(--onv-radius, 5px);
    box-shadow: var(--onv-shadow-xl);
}

.onv-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.onv-close:hover,
.onv-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


.onv-modal-header {
    background-color: var(--onv-surface, #ffffff);
    padding: 15px;
    border-bottom: 1px solid var(--onv-border, #e6e8ee);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--onv-radius, 5px) var(--onv-radius, 5px) 0 0;
}

.onv-modal-body {
    padding: 15px;
}

.onv-modal-footer {
    background-color: var(--onv-surface, #ffffff);
    padding: 15px;
    border-top: 1px solid var(--onv-border, #e6e8ee);
    text-align: right;
    border-radius: 0 0 var(--onv-radius, 5px) var(--onv-radius, 5px);
}

/* modal centered */
.onv-modal-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 600px;
}

/* modal responsif  */
@media screen and (max-width: 625px) {
    .onv-modal-wrapper {
        width: 90%;
    }
}

@media screen and (max-width: 1150px) {
    .onv-modal-xl {
        width: 90%;
    }
}

@media screen and (max-width: 825px) {
    .onv-modal-lg {
        width: 90%;
    }
}

@media screen and (max-width: 325px) {
    .onv-modal-sm {
        width: 90%;
    }
}

/* modal size */
/* Large Extra Modal */
.onv-modal-xl {
    max-width: 1140px;
}

/* Large Modal */
.onv-modal-lg {
    max-width: 800px;
}

/* Small Modal */
.onv-modal-sm {
    max-width: 300px;
}

/* Fullscreen Modal */
.onv-modal-fs {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.onv-modal-fs .onv-modal-content {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Mencegah overflow content */
}

.onv-modal-fs .onv-modal-header {
    flex-shrink: 0;
    border-radius: 0;
    position: relative;
}

.onv-modal-fs .onv-modal-body {
    flex: 1 1 auto;
    overflow-y: auto; /* Hanya body yang bisa di-scroll */
    overflow-x: hidden;
    height: 100%;
}

.onv-modal-fs .onv-modal-footer {
    flex-shrink: 0;
    border-radius: 0;
    position: relative;
}

.onv-btn-close {
    box-sizing: content-box;
    width: .75rem;
    height: .75rem;
    padding: .25em .25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/.75rem auto no-repeat;
    border: 0;
    border-radius: var(--onv-radius, 5px);
    opacity: .5
}

.onv-btn-close:hover {
    color: #000;
    text-decoration: none;
    opacity: .75
}

.onv-btn-close:focus {
    outline: 0;
    box-shadow: none;
    opacity: 1
}

.onv-btn-close.disabled,
.onv-btn-close:disabled {
    pointer-events: none;
    user-select: none;
    opacity: .25
}

.onv-btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%)
}
/* CSS untuk Modal Draggable */

/* Tambahkan style untuk modal draggable */
.onv-modal-wrapper.draggable {
    position: absolute;
    /* Margin diatur via JavaScript saat dragging dimulai */
    z-index: 9990;
}

.onv-modal-wrapper.draggable .onv-modal-header {
    cursor: move; /* Menampilkan cursor grab saat hover di header */
    user-select: none; /* Mencegah pemilihan teks saat drag */
}

.onv-modal-wrapper.draggable .onv-modal-header.dragging {
    cursor: grabbing; /* Menampilkan cursor grabbing saat sedang drag */
}

/* Tambahkan style untuk .onv-modal-sm agar lebih baik untuk dragging */
.onv-modal-sm {
    max-width: 300px;
    min-width: 250px;
}

/* Untuk memastikan header modal terlihat lebih jelas sebagai handle */
.onv-modal-wrapper.draggable .onv-modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Style khusus untuk modal yang sedang di-drag */
.onv-modal-wrapper.draggable[data-dragged="true"] {
    box-shadow: var(--onv-shadow-xl);
    transition: box-shadow 0.2s;
}
/* onv-modal.css end */
