/* C-Loot Editor Custom Styles */

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Container cards */
.container-card {
  transition: all 0.2s ease;
}

.container-card:hover {
  transform: translateY(-2px);
}

.container-card img {
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
}

/* Item rows */
.item-row {
  transition: all 0.2s ease;
}

.item-row:hover {
  background-color: rgba(75, 85, 99, 0.7);
}

/* Modal animation */
#addItemModal > div {
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Toggle switch */
.peer:checked ~ .peer-checked\:bg-orange-600 {
  background-color: #ea580c;
}

/* Input focus styles */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #ea580c !important;
  box-shadow: 0 0 0 1px rgba(234, 88, 12, 0.3);
}

/* Toast animation */
#toast {
  animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Plugin nav hover effect */
.plugin-btn {
  transition: all 0.2s ease;
}

/* Category badges */
.category-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
}

/* Loading spinner */
.spinner {
  border: 3px solid #374151;
  border-top-color: #ea580c;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Drag and drop hover */
.drop-zone {
  border: 2px dashed #4b5563;
  transition: all 0.2s ease;
}

.drop-zone.drag-over {
  border-color: #ea580c;
  background-color: rgba(234, 88, 12, 0.1);
}

/* Number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
  height: 24px;
}

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 100;
  margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  aside {
    display: none;
  }

  .container-card {
    padding: 0.75rem;
  }

  .container-card img {
    height: 4rem;
  }
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Success/error states */
.success-bg {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}

.error-bg {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

/* Header sticky shadow */
header {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Sidebar sticky */
aside {
  height: calc(100vh - 3.5rem);
}

/* Modal item grid */
#modalItemList {
  display: grid;
  gap: 0.5rem;
}

.modal-item-btn {
  transition: all 0.15s ease;
}

.modal-item-btn:hover {
  transform: scale(1.02);
}

/* Selected item highlight */
.modal-item-btn.selected {
  background-color: #ea580c;
  color: white;
}
