/* Custom styles for ProcureSmart UAE */

/* Tab Navigation */
.tab-button {
  color: #6b7280;
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.tab-button.active {
  color: #1f2937;
  background-color: #f3f4f6;
}

.tab-button:hover:not(.active) {
  color: #374151;
  background-color: #f9fafb;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Optimization Buttons */
.optimization-btn {
  color: #6b7280;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
}

.optimization-btn.active {
  color: white;
  background-color: #3b82f6;
  border-color: #3b82f6;
}

.optimization-btn:hover:not(.active) {
  background-color: #f3f4f6;
}

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

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #3b82f6;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .flex {
    flex-direction: column;
  }

  .space-x-4 > * + * {
    margin-left: 0;
    margin-top: 1rem;
  }
}

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

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Focus States */
input:focus,
textarea:focus,
button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Hover Effects */
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

.slide-in {
  animation: slideIn 0.3s ease-out;
}

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