/* Custom Admin Styles for Creative Bangladesh */

/* Badge styling for changelist */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 9999px;
  background-color: rgb(243 244 246);
  color: rgb(55 65 81);
}

.dark .badge {
  background-color: rgb(55 65 81);
  color: rgb(209 213 219);
}

/* Image preview in changelist */
.thumbnail-preview {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid rgb(229 231 235);
}

.dark .thumbnail-preview {
  border-color: rgb(55 65 81);
}

/* Status indicators */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
}

.status-badge.success {
  background-color: rgb(220 252 231);
  color: rgb(22 101 52);
}

.dark .status-badge.success {
  background-color: rgb(20 83 45);
  color: rgb(187 247 208);
}

.status-badge.warning {
  background-color: rgb(254 249 195);
  color: rgb(133 77 14);
}

.dark .status-badge.warning {
  background-color: rgb(113 63 18);
  color: rgb(254 240 138);
}

.status-badge.danger {
  background-color: rgb(254 226 226);
  color: rgb(153 27 27);
}

.dark .status-badge.danger {
  background-color: rgb(127 29 29);
  color: rgb(254 202 202);
}

/* Dashboard card animations */
.dashboard-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Quick actions button styling */
.quick-action-btn {
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  transform: scale(1.02);
}

/* Inline form improvements */
.inline-related h3 {
  padding: 0.75rem 1rem;
  background-color: rgb(249 250 251);
  border-radius: 0.375rem;
  font-weight: 600;
}

.dark .inline-related h3 {
  background-color: rgb(31 41 55);
}

/* Tab navigation improvements */
.tab-nav {
  border-bottom: 2px solid rgb(229 231 235);
}

.dark .tab-nav {
  border-bottom-color: rgb(55 65 81);
}

.tab-nav-item {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: rgb(107 114 128);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.tab-nav-item:hover {
  color: rgb(55 65 81);
}

.dark .tab-nav-item:hover {
  color: rgb(209 213 219);
}

.tab-nav-item.active {
  color: rgb(239 68 68);
  border-bottom-color: rgb(239 68 68);
}

/* Form field improvements */
.form-row {
  margin-bottom: 1.5rem;
}

.form-row label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

/* Help text styling */
.help-text {
  font-size: 0.875rem;
  color: rgb(107 114 128);
  margin-top: 0.375rem;
}

.dark .help-text {
  color: rgb(156 163 175);
}

/* Sortable inline handle */
.sortable-handle {
  cursor: grab;
  padding: 0.5rem;
  color: rgb(156 163 175);
  transition: color 0.2s ease;
}

.sortable-handle:hover {
  color: rgb(55 65 81);
}

.dark .sortable-handle:hover {
  color: rgb(209 213 219);
}

.sortable-handle:active {
  cursor: grabbing;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

/* Loading state */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid rgb(229 231 235);
  border-top-color: rgb(239 68 68);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Notification badge */
.notification-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  background-color: rgb(239 68 68);
  color: white;
  border-radius: 9999px;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: rgb(107 114 128);
}

.dark .empty-state {
  color: rgb(156 163 175);
}

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

/* Action button styling */
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.action-button.primary {
  background-color: rgb(239 68 68);
  color: white;
}

.action-button.primary:hover {
  background-color: rgb(220 38 38);
}

.action-button.secondary {
  background-color: white;
  color: rgb(55 65 81);
  border: 1px solid rgb(209 213 219);
}

.dark .action-button.secondary {
  background-color: rgb(55 65 81);
  color: rgb(243 244 246);
  border-color: rgb(75 85 99);
}

.action-button.secondary:hover {
  background-color: rgb(249 250 251);
}

.dark .action-button.secondary:hover {
  background-color: rgb(75 85 99);
}
