/**
 * Work Queue Styles
 * Estilos para la cola de trabajo y calculadora de capacidad
 */

/* Work Order Cards */
.work-order-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.work-order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.priority-indicator {
  font-size: 1.5rem;
  line-height: 1;
}

/* Stage Sections */
.stage-section {
  padding: 1rem;
  background: var(--bg-1);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary);
}

.stage-section:hover {
  background: var(--bg-2);
}

/* Form Check Cards */
.form-check-card {
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.form-check-card:hover {
  border-color: var(--primary);
  background: var(--bg-1);
}

.form-check-card .form-check-input {
  display: none;
}

.form-check-card .form-check-input:checked + .form-check-label {
  color: var(--primary);
  font-weight: 600;
}

.form-check-card .form-check-input:checked ~ {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
}

.form-check-card label {
  cursor: pointer;
  margin: 0;
  display: block;
}

.form-check-card i {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

/* Estimation Result */
.estimation-result {
  animation: fadeIn 0.3s ease-in;
}

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

.result-summary {
  animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.stage-breakdown {
  font-size: 0.9rem;
}

/* Gantt Chart */
.gantt-container {
  overflow-x: auto;
}

.gantt-table {
  min-width: 800px;
  font-size: 0.875rem;
}

.gantt-table th {
  background: var(--bg-2);
  font-weight: 600;
  padding: 0.5rem;
  vertical-align: middle;
}

.gantt-table td {
  padding: 0.25rem;
  vertical-align: middle;
  position: relative;
}

.gantt-cell {
  min-height: 40px;
  position: relative;
}

.gantt-cell.occupied {
  background: rgba(13, 110, 253, 0.2);
  border-left: 3px solid #0d6efd;
}

.gantt-cell.available {
  background: rgba(25, 135, 84, 0.1);
}

.gantt-cell.overload {
  background: rgba(220, 53, 69, 0.2);
  border-left: 3px solid #dc3545;
}

.gantt-cell.weekend {
  background: var(--bg-2);
}

.gantt-bar {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem;
  text-align: center;
  color: #0d6efd;
}

/* Work Queue List */
.work-queue-list {
  max-height: calc(100vh - 500px);
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Scrollbar personalizado */
.work-queue-list::-webkit-scrollbar {
  width: 8px;
}

.work-queue-list::-webkit-scrollbar-track {
  background: var(--bg-1);
  border-radius: 4px;
}

.work-queue-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.work-queue-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .work-order-card .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .work-order-card .btn-group .btn {
    width: 100%;
    margin-bottom: 0.25rem;
  }

  .gantt-table {
    font-size: 0.75rem;
  }

  .gantt-bar {
    font-size: 0.65rem;
  }
}

/* Sticky Result Panel */
@media (min-width: 992px) {
  .sticky-top {
    position: sticky;
    top: 20px;
    z-index: 100;
  }
}

/* Alert Customization */
.alert {
  border-left: 4px solid;
}

.alert-warning {
  border-left-color: #ffc107;
}

.alert-danger {
  border-left-color: #dc3545;
}

.alert-info {
  border-left-color: #0dcaf0;
}

/* Tab Navigation */
.nav-tabs .nav-link {
  color: var(--text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 1.5rem;
}

.nav-tabs .nav-link:hover {
  border-bottom-color: var(--border);
  color: var(--text-primary);
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
  font-weight: 600;
}

/* Progress Bars in Cards */
.mv-card .progress {
  background: var(--bg-1);
}

.mv-card .progress-bar {
  transition: width 0.6s ease;
}
