.frame-card img {
    width: 100%;
    cursor: pointer;
    border-radius: 8px;
}
.frame-card {
    position: relative;
}
.frame-card button {
    position: absolute;
    top: 5px;
    right: 5px;
}
.swal-wide {
    width: 90% !important;
    max-width: 420px;
}

.dropzone-style {
    border: 2px dashed #aaa;
    padding: 24px;
    border-radius: 12px;
    background: #f8f9fa;
    text-align: center;
}

.dropzone-style input[type="file"] {
    display: block;
    width: 100%;
}

/* Canvas Styling */
#canvas {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;

    border: 1px solid #ddd;
    background-color: #f8f9fa;

    touch-action: pan-y; /* BIARKAN SCROLL VERTICAL */
    cursor: move;

    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Dropzone styling inside SweetAlert */
.dropzone-style {
    border: 2px dashed #aaa;
    padding: 30px;
    border-radius: 12px;
    cursor: pointer;
    background: #f8f9fa;
}

/* Frame Card fixes */
.frame-preview {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Floating + Frame Button (Mobile Only) */
.frame-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
}

#frameList {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding-bottom: 5px;
    outline: none;
    border: none;
}

#frameList .frame-item {
    flex: 0 0 auto;
    width: 160px; /* bebas atur */
}

#frameList,
#frameListMobile {
    visibility: hidden;
}

.pagination-ready #frameList,
.pagination-ready #frameListMobile {
    visibility: visible;
}

/* MOBILE FRAME MODAL FIX */
#frameModal .modal-body {
    flex: 1;
    overflow: hidden; /* penting */
    display: flex;
    flex-direction: column;
}

#frameListMobile {
    flex: 1;
}

#framePaginationMobile {
    margin-top: auto; /* dorong ke bawah */
}
.frame-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 420px; /* sesuaikan kebutuhan */
}

.frame-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 8px; /* aman untuk pagination */
    -webkit-overflow-scrolling: touch;
}

.frame-pagination {
    flex-shrink: 0;
    padding-top: 5%;
    background: #fff;
}

/* === SLIDE UP MODAL (FROM BOTTOM) === */
.slide-up-modal .modal-dialog {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;

    height: 85vh;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(.22,.61,.36,1);
}

/* saat modal tampil */
.slide-up-modal.show .modal-dialog {
    transform: translateY(0);
}

/* background gelap */
.slide-up-modal {
    background: rgba(0,0,0,.4);
}

/* rounded atas */
.slide-up-modal .modal-content {
    height: 100%;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
}

.dropzone-wrapper {
    border: 2px dashed #c5c5c5;
    padding: 13px;
    border-radius: 10px;
    background: #ffffff;
    transition: 0.2s;
    cursor: pointer;
}

.dropzone-wrapper.dragover {
    border-color: #0d6efd;
    background: #f1f1f1;
}
