/*ARI BUILDER*/
body {
  font-family: 'Inter', sans-serif;
}
button {
  cursor: pointer;
}
.component {
  cursor: grab;
  transition: all 0.2s;
}
.component:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.component:active {
  cursor: grabbing;
}
.canvas {
  min-height: 500px;
}
.drop-zone {
  border: 1px dashed #ffaeae;
  min-height: 75px;
  transition: all 0.2s;
}
#canvas .fixed, #preview-content .fixed {
  position: absolute !important;
}
#preview-content.expand-area .fixed {
  position: fixed !important;
}
#canvas aside.start-0 {
  inset-inline-start: 4px;
}
#canvas aside.top-0 {
  top: 4px;
}
#canvas .drop-zone {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
#canvas .card>.drop-zone.p-2  {
  padding: 0;
}
#canvas .flex-col.gap-2 .drop-zone {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
#canvas .drop-zone.highlight {
  background-color: #e0f7fa !important;
  border: red 2px dotted;
}
.dark #canvas .drop-zone.highlight {
  background-color: #222222 !important;
}
#canvas .grid, #canvas .flex.flex-col {
  border-radius: 2px;
  position: relative;
  padding: .35rem;
}
#canvas .frames>.drop-zone:not(:empty) {
    padding-bottom: 4rem !important;
}
#canvas .frames:hover {
  background-color: #fdffde;
}
#canvas .grid.grid-cols-1:hover {
  background-color: #f3e5f5;
}
/* Level 1 (Parent) */
.drop-zone:hover {
    background-color: #f5f5f5; /* Abu-abu sangat lembut */
}
/* Level 2 */
.drop-zone .drop-zone:hover {
    background-color: #e6f0fa; /* Biru langit soft */
}
/* Level 3 */
.drop-zone .drop-zone .drop-zone:hover {
    background-color: #fce4ec; /* Pink soft */
}
/* Level 4 */
.drop-zone .drop-zone .drop-zone .drop-zone:hover {
    background-color: #e8f5e9; /* Hijau mint soft */
}
/* Level 5 */
.drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
    background-color: #fff3e0; /* Peach soft */
}
/* Level 6 */
.drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
    background-color: #e0f7fa; /* Cyan soft */
}
/* Level 7 */
.drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
    background-color: #f3e5f5; /* Lavender soft */
}
/* Level 8 */
.drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
    background-color: #fffde7; /* Kuning soft */
}
/* Level 9 */
.drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
    background-color: #e0f2f1; /* Teal soft */
}
/* Level 10 */
.drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
    background-color: #fce4d6; /* Coral soft */
}

.dark #canvas .frames:hover {
  background-color: #333; /* Abu-abu gelap */
}
.dark #canvas .grid.grid-cols-1:hover {
  background-color: #3a2b3f; /* Ungu gelap */
}
/* Level 1 (Parent) */
.dark .drop-zone:hover {
  background-color: #444; /* Abu-abu lebih gelap */
}
/* Level 2 */
.dark .drop-zone .drop-zone:hover {
  background-color: #1e2a35; /* Biru navy gelap */
}
/* Level 3 */
.dark .drop-zone .drop-zone .drop-zone:hover {
  background-color: #402630; /* Merah marun gelap */
}
/* Level 4 */
.dark .drop-zone .drop-zone .drop-zone .drop-zone:hover {
  background-color: #1b3324; /* Hijau tua */
}
/* Level 5 */
.dark .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
  background-color: #4a2c14; /* Coklat gelap */
}
/* Level 6 */
.dark .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
  background-color: #1a3a3c; /* Biru kehijauan gelap */
}
/* Level 7 */
.dark .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
  background-color: #372540; /* Ungu tua */
}
/* Level 8 */
.dark .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
  background-color: #3a340f; /* Kuning tua */
}
/* Level 9 */
.dark .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
  background-color: #204644; /* Teal gelap */
}
/* Level 10 */
.dark .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone .drop-zone:hover {
  background-color: #5a2c20; /* Coral tua */
}

#canvas .frames>.bg-white {
  background: transparent;
}
#canvas .widget {
  border-radius: 2px;
  position: relative;
}
#canvas .card .flex.flex-col {
  background: transparent;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-1 { grid-template-columns: repeat(1, 1fr); }

.remove-btn {
  z-index: 101;
  opacity: 0;
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  font-size: 0.8rem;
}
.show-class {
  z-index: 101;
  opacity: 0;
  position: absolute;
  bottom: 0px;
  right: 2px;
  width: 20px;
  height: 20px;
  font-size: 0.8rem;
}
.moveup-btn, .movedown-btn {
  z-index: 101;
  opacity: 0;
  position: absolute;
  width: 20px;
  height: 20px;
  font-size: 0.8rem;
}
.moveup-btn {
  top: 0px;
  left: -2px;
}
.movedown-btn {
  bottom: 0px;
  left: -2px;
}
*:hover > .show-class,
.show-sorter *:hover > .moveup-btn,
.show-sorter *:hover > .movedown-btn,
*:hover > .remove-btn {
  opacity: 1;
}
.show-class:hover, .moveup-btn:hover, .movedown-btn:hover, .remove-btn:hover {
  opacity: 1;
}
.editable:hover {
  background-color: #f0f0f0;
  cursor: text;
}
.dark .editable:hover {
  background-color: #1e1e1e;
}
.class-editor {
  position: absolute;
  top: 2px;
  left: 2px;
  background-color: white;
  border: 1px solid #ddd;
  padding: 5px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 100;
  display: none;
}
.dark .class-editor {
  background-color: black;
}
.class-editor.active {
  display: block;
  z-index: 100;
}
.class-editor input {
  width: 200px;
  padding: 2px 5px;
  border-radius: 2px;
}

.custom-class-editor {
  position: absolute;
  top: 2px;
  left: 2px;
  background-color: white;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  display: none;
  z-index: 100;
}
.dark .custom-class-editor {
  background-color: black;
}
.custom-class-editor.active {
  display: block;
  z-index: 100;
}
.custom-class-editor input {
  width: 200px;
  padding: 5px;
  font-family: monospace;
}
.custom-class-btn {
  opacity: 0;
  position: absolute;
  bottom: 0;
  right: 30px;
  width: 20px;
  height: 20px;
  font-size: 12px;
  z-index: 101;
}
*:hover > .custom-class-btn {
  opacity: 1;
} 
#custom-scripts, #custom-css {
  width: 100%;
  min-height: 150px;
  resize: vertical;
}
#preview-code {
  padding: 0 1rem;
}
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 150;
}
.modal-content {
  height: 97vh;
  overflow: auto;
  margin: 1% auto;
  width: 99%;
  max-width: 99%;
  border-radius: 8px;
  position: relative;
}
.modal-content.show-expand {
    height: 100vh;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
}
.preview-area {
  min-height: 400px;
  overflow: auto;
}
.preview-button, .code-button {
  padding: 8px 16px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  margin-right: 8px;
}
.preview-button.active, .code-button.active {
  background: #f3f4f6;
  font-weight: bold;
}
.dark .preview-button.active, .dark .code-button.active {
  background: #222222;
  border: #ddd 1px solid;
  font-weight: bold;
}
.dark pre[class*="language-"]>code {
  background: #222222 !important;
}
/* Untuk browser berbasis WebKit (Chrome, Edge, Safari) */
.scrollbars::-webkit-scrollbar {
  width: 6px; /* Lebar scrollbar */
  height: 6px; /* Tinggi scrollbar untuk elemen horizontal */
}
.scrollbars::-webkit-scrollbar-track {
  background: #f1f1f1; /* Warna latar belakang track */
  border-radius: 10px; /* Membuat ujung track lebih halus */
}
.scrollbars::-webkit-scrollbar-thumb {
  background: #ddd; /* Warna thumb scrollbar */
  border-radius: 10px; /* Membuat ujung thumb lebih halus */
}
.scrollbars::-webkit-scrollbar-thumb:hover {
  background: #888; /* Warna thumb saat hover */
}
.canvas.drop-zone:empty, .drop-zone:empty {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}
.canvas.drop-zone {
  overflow: hidden;
  border: none;
}
.canvas.drop-zone:empty::after, .drop-zone:empty::after {    
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
  color: #666;
  text-align: center;
  font-size: 14px;
}
.dark .canvas.drop-zone:empty::after, .dark .drop-zone:empty::after {
  color: #eee;    
}
.drop-zone:empty::after {
  content: "+ Add";
}
.canvas.drop-zone:empty::after {
    width: 100%;
    height: 200px;
    content: "+ Build Html Dashboard with Drag and Drop";
    border: #ddd 2px dashed;
    border-radius: 6px;
}
.canvas .drop-zone:empty {
  background-color: #ffffff;
}
.dark .canvas .drop-zone:empty {
  background-color: #1f2937;
}
.btn-drag {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-drag::after {
  content: "";
  display: inline-block;
  opacity: .6;
  width: 16px;
  height: 16px;
  background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16"%3E%3Cpath d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/%3E%3C/svg%3E');
  background-size: contain;
  background-repeat: no-repeat;
  vertical-align: middle;
  margin-left: 8px;
}
.dark .btn-drag::after {
  background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23ffffff" class="bi bi-grip-vertical" viewBox="0 0 16 16"%3E%3Cpath d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0M7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/%3E%3C/svg%3E');
}
/* Styling untuk preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.progress-bar-container {
    width: 200px;
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar {
    width: 0%;
    height: 100%;
    transition: width 0.3s ease;
}
.percentage {
    font-size: 16px;
    font-family: Arial, sans-serif;
}

/* preview-styles.css */
.preview-controls button {
    padding: 8px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}
.dark .preview-controls button {
    padding: 8px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    background: black;
    cursor: pointer;
}
.preview-controls button:hover {
    background: #f3f4f6;
}
.preview-controls button.active {
    background: #f3f4f6;
    border-color: #dddddd;
}
.dark .preview-controls button:hover {
    background: #222222;
}
.dark .preview-controls button.active {
    background: #222222;
    border-color: #dddddd;
}
#preview-content {
    overflow: hidden;
    max-width: 100%;
}
#preview-iframe {
    max-width: 100%;
}
#canvas main>.drop-zone {
    margin-left: 5px;
}
