/* layout.css */
/* File ini sekarang HANYA berisi style yang spesifik untuk MODE EDIT TATA LETAK */
/* Style umum form (default width, dll) sudah dipindahkan/disesuaikan di app.css */
/* Indikasi global bahwa mode edit layout aktif */
/* Kelas .layout-edit-active-global ditambahkan ke #app oleh Vue */
.nama-barang {
    border: 1px solid black;
    position: absolute;
    z-index: 100;
    /*+placement: 13px 119px;*/
    position: relative;
    left: 13px;
    top: 119px;
    width: 247px;
    background-color: #EDCCCC;
}

#app.layout-edit-active-global .form-editor {
    background-color: #F0F5FA !important;
    /* Warna latar yang sedikit berbeda saat mode edit */
    /* outline: 2px dotted #7aa5d6; /* Outline opsional pada keseluruhan form editor jika diinginkan */
    transition: background-color 0.3s ease;
}

/* Styling untuk form-group saat mode edit layout (draggable) */
/* Kelas .layout-field-editable ditambahkan ke .form-group oleh Vue */
#app.layout-edit-active-global .form-editor .form-group.layout-field-editable {
    cursor: move;
    border: 1px dashed #A0C4FF !important;
    /* Warna border yang lebih terlihat */
    /* background-color: #ffffff; /* Biarkan background default group field, atau sesuaikan */
    padding: 3px !important;
    margin-bottom: 5px !important;
    /* Kurangi margin agar lebih rapat saat edit */
    /* position: static; by default, akan di-override oleh inline style jika ada layout.kiri/atas */
}

#app.layout-edit-active-global .form-editor .form-group.layout-field-editable:hover {
    border-color: #0056B3 !important;
    background-color: #E7F0F9 !important;
    /* Background berbeda saat hover di mode edit */
}

/* Saat grup field di-drag untuk posisi */
#app.layout-edit-active-global .form-editor .form-group.is-dragging {
    border-style: solid !important;
    border-color: #28A745 !important;
    /* Hijau saat di-drag */
    opacity: 0.7;
    z-index: 1001;
    /* Di atas field lain saat di-drag */
}

/* Saat input wrapper di-resize lebarnya (Shift + Klik Kiri) */
/* Kelas .is-resizing-width ditambahkan ke .form-field-input-wrapper oleh JavaScript */
#app.layout-edit-active-global .form-editor .form-field-input-wrapper.is-resizing-width {
    opacity: 0.8;
    outline: 2px dashed #FD7E14 !important;
    /* Outline oranye saat resize lebar */
    cursor: ew-resize !important;
    /* Kursor resize horizontal */
}

/* Indikasi hover pada .form-field-input-wrapper saat mode edit aktif */
/* Ini membantu user tahu area mana yang bisa di-Shift+Klik untuk resize */
#app.layout-edit-active-global .form-field-input-wrapper:hover {
    /* outline: 1px dotted #c0c0c0; /* Outline sangat tipis saat hover (opsional) */
    /* background-color: #f8f8f8; /* Background sedikit berubah saat hover (opsional) */
}

/* Custom CSS untuk panah submenu yang lebih dalam */
.sub-menu-l2 {
    padding-left: 20px;
    /* Lebih menjorok ke dalam */
}

.sub-item-link-l2 I {
    margin-right: 8px;
}

.menu-item-wrapper .submenu-arrow.nested-arrow {
    font-size: 0.8em;
    /* Panah untuk level 2 bisa lebih kecil */
    margin-left: auto;
}

/* Image Gallery Styles */
.image-gallery-section {
    border-top: 1px solid #EEE;
    padding-bottom: 0;
    margin-bottom: 20px;
}

.image-gallery-section LABEL {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.image-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    /*+placement: ;*/
    position: relative;
    left: 0;
    top: 0;
}

.thumbnail-item {
    position: relative;
    width: 50px;
    /* Ukuran thumbnail */
    height: 42px;
    border: 1px solid #DDD;
    border-radius: 4px;
    overflow: hidden;
    /* Untuk memastikan gambar tidak keluar dari border */
}

.thumbnail-item IMG {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Gambar akan mengisi area thumbnail tanpa distorsi */
    cursor: pointer;
    display: block;
}

.thumbnail-item .btn-delete-img {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.thumbnail-item .btn-delete-img:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* Image Modal Styles */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    /* Di atas komponen lain */
}

.image-modal-content {
    position: relative;
    background-color: #FFF;
    /* Sebaiknya tidak ada background agar transparan untuk zoom */
    padding: 0;
    /* Hapus padding jika gambar mengisi seluruh modal */
    border-radius: 5px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: scroll;
    /* Untuk konten gambar */
    cursor: zoom-out;
    /* Default cursor saat gambar besar */
}

.image-modal-content.zoomed {
    cursor: zoom-in;
}

.image-modal-content IMG {
    display: block;
    max-width: 100%;
    width: auto;
    /* Default width */
    /* Default height */
    object-fit: contain;
    /* Agar gambar tidak terpotong */
    transition: transform 0.3s ease;
    /* Untuk animasi zoom */
    overflow: no-content;
}

.image-modal-content.zoomed IMG {
    max-width: none;
    /* Hapus batasan max-width saat zoom */
    max-height: none;
    /* Hapus batasan max-height saat zoom */
    width: auto;
    /* Biarkan gambar mengambil ukuran aslinya atau lebih besar */
    height: auto;
    /* transform: scale(1.5); Atur skala zoom sesuai kebutuhan */
    /* Jika ingin gambar bisa di-drag saat zoom, perlu JS tambahan */
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #FFF;
    /* Warna kontras dengan overlay gelap */
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1051;
    /* Di atas gambar */
}

.image-modal-close:hover {
    color: #CCC;
}

.data-table {
    width: 200px;
    border-collapse: collapse;
    width: 185px;
    border: 1px solid black;
    background-color: #FFFFFF;
    font-size: 12px;
    border-top: 1px solid black;
}

.grid-external-html-block {
    position: relative;
    margin-left: 457px;
    margin-top: 4px;
}

.table-header {
    border: 1px solid #CCC;
    padding: 0px 8px;
    text-align: left;
    background-color: #F5F5F5;
    font-weight: bold;
}

.table-cell {
    border: 0px solid #CCC;
    padding: 0px 8px;
    text-align: right;
    font-weight: normal;
    border-top: 1px solid black;
    width: 103px;
}

.handsontable.listbox TR TD.current, .handsontable.listbox TR:hover TD {
    background: #B7BFF5;
}

.handsontable.listbox TD.htDimmed {
    color: #0E156E;
    cursor: default;
    font-style: inherit;
    background-color: #F1FFC5;
    font-weight: bold;
    font-family: monospace;
}
