/* Out-of-Class Table Layout Fixes */
.outofclass-table {
  table-layout: fixed !important;
  width: 100% !important;
}

.outofclass-table th,
.outofclass-table td {
  word-wrap: break-word !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  padding: 8px 6px !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
}

/* Specific column width adjustments - House column widened to 110px */
.outofclass-table th:nth-child(1) { width: 40px !important; } /* Checkbox */
.outofclass-table th:nth-child(2) { width: 90px !important; } /* Date */
.outofclass-table th:nth-child(3) { width: 180px !important; } /* Student */
.outofclass-table th:nth-child(4) { width: 80px !important; } /* Year */
.outofclass-table th:nth-child(5) { width: 110px !important; } /* House - widened from 80px */
.outofclass-table th:nth-child(6) { width: 140px !important; } /* Reason - adjusted */
.outofclass-table th:nth-child(7) { width: 110px !important; } /* Details - adjusted */
.outofclass-table th:nth-child(8) { width: 110px !important; } /* Staff - adjusted */
.outofclass-table th:nth-child(9) { width: 70px !important; } /* Actions */

/* Remove pulse animation from house badges */
.outofclass-table .badge.house-badge {
  animation: none !important;
}

/* Add pulse animation for count badges over 15 */
.outofclass-table .count-badge-high {
  animation: pulse 2s ease-in-out infinite !important;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

/* Prevent badge overflow */
.outofclass-table .badge {
  display: inline-block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Improve count display */
.outofclass-count {
  font-size: 0.7rem !important;
  white-space: nowrap !important;
  padding: 1px 4px !important;
  border-radius: 3px !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .outofclass-table th:nth-child(3) { width: 150px !important; } /* Student */
  .outofclass-table th:nth-child(5) { width: 100px !important; } /* House */
  .outofclass-table th:nth-child(6) { width: 120px !important; } /* Reason */
  .outofclass-table th:nth-child(7) { width: 100px !important; } /* Details */
  .outofclass-table th:nth-child(8) { width: 100px !important; } /* Staff */
}

@media (max-width: 992px) {
  .outofclass-table th:nth-child(3) { width: 120px !important; } /* Student */
  .outofclass-table th:nth-child(4) { width: 60px !important; } /* Year */
  .outofclass-table th:nth-child(5) { width: 60px !important; } /* House */
  .outofclass-table th:nth-child(6) { width: 100px !important; } /* Reason */
  .outofclass-table th:nth-child(7) { width: 80px !important; } /* Details */
  .outofclass-table th:nth-child(8) { width: 80px !important; } /* Staff */
}

/* Fix for frequent flyers auto-loading issue */
.frequent-flyers-loading {
  display: none !important;
}

/* Preload warning fixes - hide excessive warnings */
.preload-warnings {
  display: none !important;
}
