/* CDEBOX v2 Custom Styles */

/* Base styles */
:root {
  --primary-color: #ff661a;
  --primary-dark: #e55a17;
  --secondary-color: #283043;
  --success-color: #059669;
  --warning-color: #d97706;
  --error-color: #dc2626;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-900: #0f172a;
}

/* Custom breakpoint at 1000px for navigation */
@media (min-width: 1000px) {
  .custom-nav-hidden {
    display: none;
  }

  .custom-nav-flex {
    display: flex;
    margin-left: 1.5rem;
  }

  .custom-nav-space-x-8 > * + * {
    margin-left: 2rem;
  }
}

@media (max-width: 999px) {
  .custom-nav-flex {
    display: none;
  }

  .custom-nav-hidden {
    display: block;
  }
}

/* Custom color classes to override Tailwind defaults */
.bg-primary {
  background-color: var(--primary-color) !important;
}
.bg-primary-dark {
  background-color: var(--primary-dark) !important;
}
.bg-secondary {
  background-color: var(--secondary-color) !important;
}
.text-primary {
  color: var(--primary-color) !important;
}
.text-primary-dark {
  color: var(--primary-dark) !important;
}
.text-secondary {
  color: var(--secondary-color) !important;
}
.border-primary {
  border-color: var(--primary-color) !important;
}
.border-primary-dark {
  border-color: var(--primary-dark) !important;
}
.border-secondary {
  border-color: var(--secondary-color) !important;
}

/* Legacy overrides removed: use Tailwind blue palette for informational actions.
   For brand orange, prefer the `.bg-primary` / `.text-primary` helpers defined above. */

/* Gradient overrides */
.from-blue-600 {
  --tw-gradient-from: var(--primary-color) !important;
}
.to-blue-800 {
  --tw-gradient-to: var(--primary-dark) !important;
}

/* Blue backgrounds for steps/accents with primary color */
.bg-blue-100 {
  background-color: rgba(255, 102, 26, 0.1) !important;
}

/* Orange color classes for notifications and accents */
.bg-orange-50 {
  background-color: rgba(255, 102, 26, 0.05) !important;
}
.text-orange-700 {
  color: #e55a17 !important;
}
.border-orange-400 {
  border-color: rgba(255, 102, 26, 0.6) !important;
}
.text-orange-600 {
  color: var(--primary-color) !important;
}

/* Focus ring colors */
.focus\:ring-2:focus {
  --tw-ring-opacity: 0.5;
}
.focus\:ring-blue-500:focus,
.focus\:ring-primary:focus {
  --tw-ring-color: var(--primary-color) !important;
}

/* Status badges and alerts - keep original functionality but update colors where appropriate */
.bg-blue-50 {
  background-color: rgba(255, 102, 26, 0.05) !important;
}
.text-blue-50 {
  color: rgba(255, 102, 26, 0.05) !important;
}

/* Hover states for various blue elements */
.hover\:text-blue-500:hover {
  color: var(--primary-color) !important;
}
.hover\:bg-blue-500:hover {
  background-color: var(--primary-color) !important;
}

/* Additional form control colors */
input.text-blue-600,
select.text-blue-600,
textarea.text-blue-600 {
  color: var(--primary-color) !important;
}

/* Custom checkbox and radio colors */
input[type="checkbox"].text-blue-600:checked,
input[type="radio"].text-blue-600:checked {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

/* Smooth transitions */
* {
  transition: all 0.2s ease-in-out;
}

/* Loading spinner */
.spinner {
  animation: spin 1s linear infinite;
  border-radius: 50%;
  height: 2rem;
  width: 2rem;
  border: 2px solid transparent;
  border-top: 2px solid var(--primary-color);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mobile responsiveness improvements */
@media (max-width: 640px) {
  .table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  .print-full-width {
    width: 100% !important;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for better accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-900);
}
