/**
 * ESIS Directory - Modern Directory Styles
 * 
 * Advanced styling for the employee directory page
 */

/* Search and Filter Panels */
.search-panel {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.07);
  margin-bottom: 2rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.search-panel:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.search-input-group {
  display: flex;
  border-radius: 8px;
  border: 1px solid #e5e9f2;
  background: white;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.search-input-group:focus-within {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
  border-color: var(--primary-color);
}

.search-input-group input {
  border: none;
  box-shadow: none;
  flex-grow: 1;
}

.search-input-group input:focus {
  outline: none;
  box-shadow: none;
}

.search-input-group button {
  background: var(--primary-color);
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  color: white;
  font-weight: 500;
  transition: all 0.3s ease;
}

.search-input-group button:hover {
  background: #0b5ed7;
  transform: translateY(-2px);
}

/* Filter Display */
.filter-chip {
  background-color: #f8f9fa;
  border-radius: 50px;
  padding: 0.35rem 1rem;
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background-color: #e9ecef;
}

.filter-chip .close-icon {
  margin-left: 0.5rem;
  opacity: 0.6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip .close-icon:hover {
  opacity: 1;
}

.filter-title {
  font-weight: 600;
  margin-right: 0.25rem;
  color: var(--primary-color);
}

/* Advanced Filter Panel */
.filter-section {
  padding: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: rgba(247, 250, 255, 0.5);
  border-radius: 0 0 1rem 1rem;
}

.filter-section .form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.5rem;
}

.filter-section .form-select {
  border-radius: 8px;
  border: 1px solid #e5e9f2;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
}

.filter-section .form-select:focus {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
  border-color: var(--primary-color);
}

.filter-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1.5rem;
  background: none;
  border: 1px solid #e5e9f2;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.filter-button:hover {
  background-color: #f8f9fa;
}

.filter-button:focus {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.filter-button i {
  transition: transform 0.3s ease;
}

.filter-button:not(.collapsed) i {
  transform: rotate(180deg);
}

/* Card Views for Directory Profiles */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.directory-card {
  border-radius: 1rem;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.directory-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.directory-card .card-header {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: linear-gradient(45deg, var(--primary-color) 0%, #0066eb 100%);
  color: white;
  text-align: center;
}

.directory-card .card-header::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 30px;
  background: white;
  border-radius: 50% 50% 0 0;
}

.directory-card .profile-image {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
  background-color: #f8f9fa;
}

.directory-card .profile-name {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 1;
}

.directory-card .profile-title {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.directory-card .card-body {
  padding: 1.75rem 1.5rem 1.5rem;
  flex-grow: 1;
}

.directory-card .info-row {
  display: flex;
  margin-bottom: 0.85rem;
  align-items: flex-start;
}

.directory-card .info-row:last-child {
  margin-bottom: 0;
}

.directory-card .info-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.85rem;
  font-size: 0.9rem;
}

.directory-card .info-content {
  flex-grow: 1;
}

.directory-card .info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}

.directory-card .info-value {
  font-weight: 500;
  color: #495057;
  font-size: 0.95rem;
  line-height: 1.3;
}

.directory-card .card-footer {
  padding: 1rem 1.5rem;
  background-color: #f8f9fa;
  border-top: 1px solid #f0f0f0;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  font-weight: 500;
  border-radius: 50px;
  transition: all 0.3s ease;
  border: none;
  background: linear-gradient(45deg, var(--primary-color) 0%, #0066eb 100%);
  color: white;
  width: 100%;
}

.profile-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.2);
  color: white;
}

.profile-btn i {
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.profile-btn:hover i {
  transform: translateX(3px);
}

/* List View */
.directory-table {
  width: 100%;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.directory-table .table {
  margin-bottom: 0;
}

.directory-table thead {
  background-color: #f8f9fa;
}

.directory-table th {
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #f0f0f0;
}

.directory-table td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s ease;
}

.directory-table tr:last-child td {
  border-bottom: none;
}

.directory-table tr:hover td {
  background-color: rgba(247, 250, 255, 0.6);
}

.directory-table .profile-pic-sm {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  margin-right: 1rem;
}

.directory-table .user-info {
  display: flex;
  align-items: center;
}

.directory-table .user-name {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.directory-table .user-meta {
  font-size: 0.8rem;
  color: #6c757d;
}

.directory-table .action-btn {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.85rem;
}

/* View Type Toggle */
.view-toggle {
  display: inline-flex;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 0.25rem;
  border: 1px solid #e5e9f2;
}

.view-toggle .toggle-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6c757d;
  border-radius: 6px;
  border: none;
  background: none;
  transition: all 0.2s ease;
}

.view-toggle .toggle-btn.active {
  color: white;
  background-color: var(--primary-color);
}

.view-toggle .toggle-btn:hover:not(.active) {
  background-color: #e9ecef;
}

/* Results Info */
.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.results-count {
  font-size: 0.95rem;
  color: #6c757d;
}

.results-count strong {
  color: #212529;
  font-weight: 600;
}

/* Export Dropdown */
.export-dropdown .dropdown-toggle {
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #e5e9f2;
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.export-dropdown .dropdown-toggle:hover {
  background-color: #e9ecef;
  border-color: #dde0e5;
}

.export-dropdown .dropdown-toggle i {
  color: var(--primary-color);
  margin-right: 0.25rem;
}

.export-dropdown .dropdown-menu {
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 0.75rem;
  padding: 0.5rem;
  min-width: 160px;
}

.export-dropdown .dropdown-item {
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.export-dropdown .dropdown-item:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.export-dropdown .dropdown-item i {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* Pagination and Load More */
.directory-pagination {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.directory-pagination .pagination {
  justify-content: center;
}

.directory-pagination .page-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 0.25rem;
  border: none;
  background-color: white;
  color: #495057;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.directory-pagination .page-item:first-child .page-link,
.directory-pagination .page-item:last-child .page-link {
  border-radius: 50%;
}

.directory-pagination .page-link:hover {
  background-color: #e9ecef;
  z-index: 3;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08);
}

.directory-pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  color: white;
}

.directory-pagination .page-item.disabled .page-link {
  color: #6c757d;
  opacity: 0.5;
  background-color: #f8f9fa;
}

/* Load More Button */
.load-more-container {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.load-more-btn {
  padding: 0.65rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  background-color: white;
}

.load-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(13, 110, 253, 0.15);
}

.pagination-info {
  margin-top: 0.75rem;
  color: #6c757d;
  font-size: 0.9rem;
}

/* No Results Display */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.no-results .icon-container {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-color: rgba(13, 110, 253, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-results .icon-container i {
  font-size: 2rem;
  color: var(--primary-color);
}

.no-results h3 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.no-results p {
  color: #6c757d;
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.no-results .btn {
  border-radius: 50px;
  padding: 0.65rem 2rem;
  font-weight: 500;
}

/* Login Prompt */
.login-prompt {
  background: linear-gradient(45deg, #f1f9ff 0%, #e6f4fe 100%);
  border: none;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-prompt::before {
  content: '';
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle, rgba(13,110,253,0.1) 0%, rgba(13,110,253,0) 70%);
  border-radius: 50%;
}

@media (min-width: 768px) {
  .login-prompt {
    flex-direction: row;
    align-items: center;
  }
  
  .login-prompt .prompt-content {
    flex-grow: 1;
    padding-right: 2rem;
  }
}

.login-prompt h5 {
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.5rem;
}

.login-prompt p {
  color: #495057;
  margin-bottom: 1rem;
}

.login-prompt .btn {
  border-radius: 50px;
  padding: 0.65rem 1.75rem;
  font-weight: 500;
  align-self: flex-start;
}

@media (min-width: 768px) {
  .login-prompt .btn {
    align-self: center;
  }
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .directory-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  .search-input-group {
    flex-wrap: wrap;
  }
  
  .search-input-group input {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .search-input-group button {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .results-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .results-count {
    margin-bottom: 1rem;
  }
  
  .search-panel {
    padding: 1.25rem;
  }
  
  .directory-table td, 
  .directory-table th {
    padding: 0.75rem 1rem;
  }
  
  .directory-table .profile-pic-sm {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 576px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-section {
    padding: 1.25rem;
  }
  
  .directory-pagination .page-link {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .view-toggle .toggle-btn {
    padding: 0.4rem 0.75rem;
  }
} 