/* Staff Directory Specific Styles */

.directory-controls {
  background-color: var(--bg-light);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.directory-search {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

.search-input:focus {
  outline: 2px solid var(--secondary-gold);
  outline-offset: 0;
  border-color: var(--secondary-gold);
}

.directory-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  background-color: white;
  cursor: pointer;
  min-width: 150px;
}

.filter-select:focus {
  outline: 2px solid var(--secondary-gold);
  outline-offset: 0;
  border-color: var(--secondary-gold);
}

/* Staff Grid */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.staff-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.staff-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: var(--bg-light);
}

.staff-info {
  padding: 1.5rem;
}

.staff-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 0.25rem;
}

.staff-position {
  color: var(--secondary-gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.staff-school {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.staff-contact {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  font-size: 0.9rem;
}

.staff-contact p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.staff-contact a {
  color: var(--primary-blue);
  word-break: break-all;
}

.staff-contact a:hover {
  color: var(--secondary-gold);
}

/* Table View */
.directory-view-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.view-btn {
  padding: 0.5rem 1rem;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-btn:hover,
.view-btn.active {
  background-color: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.directory-table {
  display: none;
}

.directory-table.active {
  display: block;
}

.staff-grid.active {
  display: grid;
}

.staff-grid:not(.active) {
  display: none;
}

.directory-table table {
  width: 100%;
}

.directory-table th {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 2rem;
}

.directory-table th:hover {
  background-color: #002d6b;
}

.directory-table th.sortable::after {
  content: "⇅";
  position: absolute;
  right: 0.5rem;
  opacity: 0.5;
}

.directory-table th.sort-asc::after {
  content: "↑";
  opacity: 1;
}

.directory-table th.sort-desc::after {
  content: "↓";
  opacity: 1;
}

.directory-table td a {
  color: var(--primary-blue);
}

.directory-table td a:hover {
  color: var(--secondary-gold);
}

/* Results count */
.results-info {
  text-align: center;
  margin: 2rem 0;
  color: #666;
  font-size: 0.95rem;
}

.no-results {
  text-align: center;
  padding: 3rem 0;
  color: #999;
}

.no-results h3 {
  color: #666;
  margin-bottom: 1rem;
}

/* Department badges */
.dept-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.dept-badge.admin {
  background-color: #e3f2fd;
  color: #1976d2;
}

.dept-badge.teaching {
  background-color: #f3e5f5;
  color: #7b1fa2;
}

.dept-badge.support {
  background-color: #e8f5e9;
  color: #388e3c;
}

.dept-badge.athletics {
  background-color: #fff3e0;
  color: #f57c00;
}

/* Responsive */
@media (max-width: 768px) {
  .directory-search {
    flex-direction: column;
  }

  .search-input {
    width: 100%;
  }

  .directory-filters {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .staff-grid {
    grid-template-columns: 1fr;
  }

  .directory-table {
    overflow-x: auto;
  }

  .directory-table table {
    min-width: 600px;
  }
}
