/* Neo-Brutalist Design System - Custom Styles */

/* Base styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Focus styles */
:focus-visible {
  outline: 3px solid #FFD700;
  outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border: 2px solid #000;
}

::-webkit-scrollbar-thumb {
  background: #000;
}

::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading indicator */
.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator {
  display: inline-block;
}

.htmx-request.htmx-indicator {
  display: inline-block;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 1rem 1.5rem;
  background: #000;
  color: #fff;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 0 #FFD700;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

.toast.success {
  background: #10B981;
  box-shadow: 4px 4px 0 0 #000;
}

.toast.error {
  background: #EF4444;
  box-shadow: 4px 4px 0 0 #000;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Drag and drop styles */
.sortable-ghost {
  opacity: 0.4;
  background: #FFD700;
}

.sortable-drag {
  cursor: grabbing;
}

.sortable-handle {
  cursor: grab;
}

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

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .dark\:bg-gray-900 {
    background-color: #111827;
  }
  
  .dark\:bg-gray-800 {
    background-color: #1f2937;
  }
  
  .dark\:text-white {
    color: #fff;
  }
  
  .dark\:text-gray-300 {
    color: #d1d5db;
  }
  
  .dark\:border-gray-700 {
    border-color: #374151;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  nav,
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .shadow-brutal,
  .shadow-brutal-sm {
    box-shadow: none;
  }
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #EF4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #10B981;
}

/* Button states */
button:disabled,
input[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .shadow-brutal {
    box-shadow: 2px 2px 0 0 #000;
  }
  
  .shadow-brutal-sm {
    box-shadow: 1px 1px 0 0 #000;
  }
}
