@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(to bottom right, #f0f5ff, #f3e8ff);
  color: #1e293b;
  min-height: 100vh;
  overflow-x: hidden;
}

.upload-area {
  transition: all 0.3s ease;
}

.upload-area.drag-over {
  border-color: #6366f1;
  background-color: #f0f5ff;
}

.image-card {
  transition: all 0.3s ease;
}

.image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(99, 102, 241, 0.3);
  border-top: 3px solid #6366f1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e293b;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
  z-index: 50;
}

.tooltip.show {
  opacity: 1;
  visibility: visible;
}

.action-buttons {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.url-container {
  position: relative;
  cursor: pointer;
}

.url-container:hover .url-tooltip {
  opacity: 1;
}

.url-tooltip {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #3b82f6;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 10;
}

.folder-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.folder-badge:hover {
  transform: scale(1.05);
}

.folder-selector {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.folder-selector::-webkit-scrollbar {
  width: 6px;
}

.folder-selector::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.folder-selector::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 3px;
}

.folder-selector::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.preview-container {
  position: relative;
  width: 100%;
  height: 200px;
  background-color: #f1f5f9;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-placeholder {
  color: #94a3b8;
  font-size: 2rem;
}

.folder-selector-container {
  position: relative;
  z-index: 10;
}

.no-images {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.no-images i {
  font-size: 3rem;
  margin-bottom: 16px;
  color: #94a3b8;
}

.folder-navigation {
  display: flex;
  flex-wrap: nowrap; /* Ini dari perbaikan scroll horizontal */
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px; 
  scrollbar-width: thin;
  scrollbar-color: #a5b4fc #f0f5ff;
}

.folder-navigation::-webkit-scrollbar {
  height: 6px;
}

.folder-navigation::-webkit-scrollbar-track {
  background: #f0f5ff;
  border-radius: 3px;
}

.folder-navigation::-webkit-scrollbar-thumb {
  background-color: #a5b4fc;
  border-radius: 3px;
}

.folder-navigation::-webkit-scrollbar-thumb:hover {
  background-color: #818cf8;
}


/* === TAMBAHAN UNTUK TOMBOL HAPUS FOLDER === */

.folder-badge-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 8px; 
}

.folder-badge {
  padding-right: 12px;
  margin-right: 0;
}

.delete-folder-btn {
  position: absolute;
  top: 50%;
  right: -4px; 
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #ef4444; 
  color: white;
  border: 1px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.folder-badge-wrapper:hover .delete-folder-btn {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.delete-folder-btn:hover {
  background-color: #dc2626; 
}

/* ============================= */
/* Perbaikan Dropdown Brand Header */
/* ============================= */
.brand-dropdown {
  width: auto !important; /* Perbaikan Paksa */
  min-width: 150px; 
  max-width: 250px; 
  flex-shrink: 0;   
}