/* General Styling */
body {
    /*r*/
}

/* DIUBAH: Floating Windows dengan Awalan 've-' */
.ve-floating-window {
    position: fixed;
    background-color: #FFFFFF;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s;
    font-family: arial;
}

.ve-floating-window.ve-hidden {
    opacity: 0;
    pointer-events: none;
}

.ve-window-header {
    padding: 8px 12px;
    background-color: #E9ECEF;
    border-bottom: 1px solid #DCDCDC;
    border-radius: 8px 8px 0 0;
    cursor: grab;
    font-weight: 600;
    font-size: 14px;
}

.ve-window-header:active {
    cursor: grabbing;
}

.ve-window-content {
    padding: 10px;
}

/* Toolbox Specific */
#toolbox {
    width: 180px;
}

#toolbox button {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid #CCC;
    background-color: #F8F8F8;
    cursor: pointer;
    border-radius: 4px;
    text-align: left;
    font-size: 14px;
}

#toolbox button:hover {
    background-color: #EEF;
    border-color: #007BFF;
}

/* Properties Panel Specific */
#properties-panel {
    width: 340px;
    max-height: calc(100vh - 100px);
}

.ve-panel-actions {
    display: flex;
    justify-content: space-between;
    padding: 4px 7px 6px 6px;
    border-bottom: 1px solid #E0E0E0;
    flex-wrap: wrap;
    /* BARU: Agar tombol bisa turun baris jika tidak muat */
    gap: 8px;
    /* BARU: Memberi jarak antar tombol */
    width: ;
}

.ve-panel-actions button {
    padding: 8px 0px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 10px;
    flex-grow: 1;
    /* BARU: Agar tombol bisa membagi ruang */
}

#save-button {
    background: #007BFF;
    color: white;
}

#save-button:hover {
    background: #0056B3;
}

#delete-button {
    background: #DC3545;
    color: white;
}

#delete-button:hover {
    background: #C82333;
}

/* BARU: Gaya Tombol Reset */
#reset-button {
    background: #FFC107;
    color: black;
}

#reset-button:hover {
    background: #E0A800;
}

/* BARU: Gaya Tombol Batal Pilih */
#deselect-button {
    background: #6C757D;
    color: white;
}

#deselect-button:hover {
    background: #5A6268;
}

/* Mode Toggle Button */
#mode-toggle {
    position: fixed;
    top: 15px;
    right: 20px;
    background-color: white;
    border-radius: 50px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 1001;
    transition: background-color 0.3s;
}

#mode-toggle:hover {
    background-color: #EEF;
}

#mode-toggle i {
    font-size: 24px;
    color: #555;
}

/* Editor Canvas & Elements */
#editor-canvas {
}

.editable-element {
    position: relative;
    /* DIUBAH: Menggunakan posisi relatif */
    box-sizing: border-box;
    min-width: 20px;
    min-height: 20px;
    transition: box-shadow 0.2s;
}

body.edit-mode .editable-element {
    cursor: move;
}

body.edit-mode .editable-element:hover {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5);
}

body.edit-mode .editable-element.selected {
    outline: 2px dashed #007BFF;
    outline-offset: 3px;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.3);
}

.editable-element.selected::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background-color: #007BFF;
    border: 2px solid white;
    border-radius: 50%;
    cursor: se-resize;
    z-index: 999;
}

/* DIUBAH: Tabs & Form Controls dengan Awalan 've-' */
.ve-tab-buttons {
    display: flex;
    background-color: #F8F9FA;
    flex-wrap: wrap;
}

.ve-tab-button {
    flex-grow: 1;
    padding: 6px 0 7px;
    background: none #FFFFFF;
    cursor: pointer;
    font-size: 11px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    border: 1px solid #EEE6E6;
    border-bottom: 0px solid black;
}

.ve-tab-button:hover {
    background-color: #E9ECEF;
}

.ve-tab-button.ve-active {
    border-bottom: 3px solid #007BFF;
    font-weight: 600;
}

.ve-tab-content {
    padding: 9px 15px 3px;
    overflow-y: auto;
    max-height: 50vh;
}

/* BARU: Dibuat bisa scroll */
.ve-tab-pane {
    display: none;
}

.ve-tab-pane.ve-active {
    display: block;
}

.ve-prop-group {
    margin-bottom: 12px;
}

.ve-prop-group[hidden] {
    display: none;
}

/* DIUBAH: Penyesuaian layout label untuk Scrubber */
.ve-prop-group label,
fieldset label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -3px;
    font-size: 13px;
    font-weight: 500;
    padding-bottom: 5px;
}

.ve-prop-group input,
.ve-prop-group textarea,
.ve-prop-group select,
fieldset input,
fieldset select {
    padding: 3px 6px 2px;
    border: 1px solid #CCC;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.ve-prop-group textarea {
    width: 100%;
}

fieldset {
    border: 1px solid #CCC;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 15px;
}

legend {
    font-weight: 600;
    font-size: 14px;
    padding: 0 5px;
    color: #007BFF;
}

input[type="color"] {
    padding: 2px;
    height: 30px;
    min-width: 40px;
}

.ve-security-note {
    margin-top: 15px;
    padding: 10px;
    background-color: #FFF3CD;
    border-left: 4px solid #FFEEBA;
    font-size: 12px;
    color: #856404;
}

.ve-security-note i {
    margin-right: 8px;
}

/* BARU: Gaya untuk Scrubber Numerik */
.ve-input-wrapper {
    display: flex;
    align-items: center;
    width: 60%;
}

.ve-input-wrapper input {
    width: 100%;
    margin-right: 4px;
}

.ve-scrubber {
    display: inline-block;
    padding: 0 8px;
    cursor: ew-resize;
    font-weight: bold;
    color: #888;
    user-select: none;
}

.ve-scrubber:hover {
    color: #007BFF;
}

/* BARU: Gaya untuk Info ID Terpilih */
#selected-info {
    padding: 5px 12px;
    background-color: #F8F9FA;
    font-size: 16px;
    color: #555;
    border-bottom: 1px solid #E0E0E0;
}

#selected-element-id {
    font-weight: bold;
    color: #007BFF;
    word-break: break-all;
}

.fa,
.fa-brands,
.fa-classic,
.fa-regular,
.fa-sharp,
.fa-solid,
.fab,
.far,
.fas {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display:var(--fa-display,inline-block);
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
}

.fa-classic,
.fa-regular,
.fa-solid,
.far,
.fas {
    font-family: "Font Awesome 6 Free";
}

.fa-solid,
.fas {
    font-weight: 900;
}
