/* Additional Modern UI Enhancements */

/* Smooth scrolling improvements */
html {
  scroll-padding-top: 80px; /* Account for sticky header */
}

/* Enhanced focus states for accessibility */
*:focus-visible {
  outline: 2px solid #DE3F00;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Loading states */
.loading-skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Modern toast notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.warning {
  border-left: 4px solid #f59e0b;
}

/* Enhanced dropdown menus */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: #374151;
  text-decoration: none;
  transition: background-color 0.15s ease-in-out;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

.dropdown-item:first-child {
  border-radius: 0.75rem 0.75rem 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 0.75rem 0.75rem;
}

/* Enhanced search with autocomplete */
.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-top: none;
  border-radius: 0 0 0.75rem 0.75rem;
  max-height: 300px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
  border-bottom: 1px solid #f3f4f6;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background-color: #f9fafb;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

/* Modern modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease-in-out;
  z-index: 1001;
}

.modal-overlay.show .modal {
  transform: translate(-50%, -50%) scale(1);
}

/* Improved form inputs */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-input-floating {
  width: 100%;
  padding: 1rem 1rem 0.5rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  background: white;
  transition: all 0.2s ease-in-out;
}

.form-input-floating:focus {
  outline: none;
  border-color: #DE3F00;
  box-shadow: 0 0 0 3px rgba(222, 63, 0, 0.1);
}

.form-input-floating + .form-label-floating {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  font-size: 1rem;
  color: #9ca3af;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
}

.form-input-floating:focus + .form-label-floating,
.form-input-floating:not(:placeholder-shown) + .form-label-floating {
  top: 0.25rem;
  font-size: 0.75rem;
  color: #DE3F00;
}

/* Enhanced table styles */
.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.table-modern th {
  background: #f9fafb;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.table-modern td {
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.15s ease-in-out;
}

.table-modern tbody tr:hover td {
  background: #f9fafb;
}

.table-modern tbody tr:last-child td {
  border-bottom: none;
}

/* Progress indicators */
.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: #e5e7eb;
  border-radius: 0.25rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #DE3F00, #CE422B);
  border-radius: 0.25rem;
  transition: width 0.3s ease-in-out;
}

/* Enhanced animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Animation utility classes */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

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

/* Responsive improvements */
@media (max-width: 640px) {
  .modal {
    padding: 1.5rem;
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .toast {
    right: 10px;
    left: 10px;
    transform: translateY(-100%);
  }
  
  .toast.show {
    transform: translateY(0);
  }
  
  .dropdown-content {
    position: fixed;
    top: auto;
    bottom: 20px;
    left: 20px;
    right: 20px;
    width: auto;
  }
}

/* Print styles */
@media print {
  .nav-header,
  .btn,
  .toast,
  .modal-overlay,
  #animation-container {
    display: none !important;
  }
  
  .job-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e5e7eb;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up,
  .animate-fade-in-down,
  .animate-slide-in-left,
  .animate-slide-in-right,
  .animate-pulse {
    animation: none;
  }
  
  .job-card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
}