/* ==========================================================================
   StudentJob: Candidates Directory Styling
   ========================================================================== */

.candidates-page-wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem 1.5rem;
}

.candidates-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

@media (max-width: 992px) {
  .candidates-layout {
    flex-direction: column;
  }
  .candidates-sidebar {
    width: 100% !important;
  }
}

/* Sidebar Filter */
.candidates-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #f0f7ff;
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid #e0f2fe;
}

.candidates-sidebar-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0b264b;
  margin-bottom: 1.5rem;
}

.filter-group {
  margin-bottom: 1.25rem;
  position: relative;
}

.candidates-sidebar .filter-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

/* Modern Input */
.filter-search-box {
  position: relative;
  width: 100%;
}

.filter-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #94a3b8;
}

.filter-input {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1e293b;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

.filter-input-with-icon {
  padding-left: 2.35rem !important;
}

.filter-input:focus {
  border-color: #1c7bff;
  box-shadow: 0 0 0 3px rgba(28, 123, 255, 0.12);
  background: #ffffff;
}

/* Custom Filter Select Dropdowns */
.candidate-custom-select-wrap {
  position: relative;
  width: 100%;
  user-select: none;
}

.candidate-custom-select-wrap.is-open {
  z-index: 100;
}

.candidate-custom-select-trigger {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  gap: 0.5rem;
  text-align: left;
  box-sizing: border-box;
}

.candidate-custom-select-trigger:hover {
  border-color: #cbd5e1;
  background: #fdfcff;
}

.candidate-custom-select-wrap.has-value .candidate-custom-select-trigger {
  border-color: #c4b5fd;
  background: #faf5ff;
  color: #6d28d9;
  font-weight: 600;
}

.candidate-custom-select-wrap.is-open .candidate-custom-select-trigger,
.candidate-custom-select-trigger:focus-visible {
  border-color: #1c7bff;
  box-shadow: 0 0 0 3px rgba(28, 123, 255, 0.15);
  background: #ffffff;
}

.candidate-select-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
}

.candidate-select-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex-shrink: 0;
}

.candidate-custom-select-wrap.is-open .candidate-select-chevron {
  transform: rotate(180deg);
  color: #1c7bff;
}

/* Floating Custom Menu */
.candidate-custom-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  z-index: 100;
  padding: 0.35rem;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  box-sizing: border-box;
}

.candidate-custom-select-wrap.is-open .candidate-custom-select-menu {
  display: block;
  animation: selectMenuFadeSlide 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes selectMenuFadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.candidate-custom-select-menu::-webkit-scrollbar {
  width: 5px;
}
.candidate-custom-select-menu::-webkit-scrollbar-track {
  background: transparent;
}
.candidate-custom-select-menu::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.candidate-custom-select-menu::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Option Items */
.candidate-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.62rem 0.85rem;
  margin: 2px 0;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.candidate-select-option:hover {
  background: #1c7bff17;
  color: #1c7bff;
}

.candidate-select-option.is-selected {
  background: #1b79fb1c;
  color: #1c7bff;
  font-weight: 700;
}

.candidate-select-option .option-check-icon {
  display: none;
  color: #1c7bff;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.candidate-select-option.is-selected .option-check-icon {
  display: inline-block;
}

/* Sidebar action buttons */
.candidate-apply-btn {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.85rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  background: #1c7bff;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(28, 123, 255, 0.28);
}

.candidate-apply-btn:hover {
  background: #733be6;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(28, 123, 255, 0.35);
}

.candidate-reset-btn {
  display: block;
  text-align: center;
  margin-top: 0.65rem;
  padding: 0.72rem;
  text-decoration: none;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  color: #64748b;
  font-weight: 600;
  font-size: 0.875rem;
  background: #ffffff;
  transition: all 0.2s ease;
}

.candidate-reset-btn:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}

/* Main Candidates Section */
.candidates-main {
  flex: 1;
  min-width: 0;
}

.candidates-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.candidates-count {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0b264b;
}

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

/* Candidate Card */
.candidate-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.candidate-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px -5px rgba(0,0,0,0.09);
  border-color: #cbd5e1;
}

.candidate-avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1.25rem;
  display: block;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.candidate-card:hover .candidate-avatar-wrapper {
  transform: scale(1.06);
}

.candidate-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

.candidate-online-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background-color: #94a3b8; /* Default inactive gray */
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.candidate-online-badge.is-online {
  background-color: #10b981; /* Green only when user is online */
  box-shadow: 0 0 0 1.5px rgba(16, 185, 129, 0.35);
}

.candidate-online-badge.is-offline,
.candidate-online-badge.is-inactive {
  background-color: #94a3b8; /* Neutral slate gray for inactive/offline */
  box-shadow: 0 0 0 1.5px rgba(148, 163, 184, 0.25);
}

.candidate-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0b264b;
  margin: 0 0 0.35rem 0;
}

.candidate-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.candidate-card:hover .candidate-name a,
.candidate-name a:hover {
  color: var(--color-primary, #1c7bff);
}

.candidate-profession {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.candidate-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.candidate-skills-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap; /* Stays on one single line - no wrapping */
  gap: 0.25rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.candidate-skill-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
  max-width: 95px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.candidate-skill-badge-more {
  background: #e2e8f0 !important;
  color: #1e293b !important;
  flex-shrink: 0 !important;
  max-width: none !important;
  font-weight: 700 !important;
}

/* Candidate Education & Language Meta Section */
.candidate-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 1.35rem;
  padding: 0;
  text-align: center;
}

.candidate-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.candidate-meta-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  margin-bottom: 3px;
  line-height: 1.2;
}

.candidate-meta-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0b264b;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.candidate-actions {
  width: 100%;
  margin-top: auto;
  display: flex;
}

.candidate-view-profile-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff !important;
  background-color: var(--color-primary, #1c7bff);
  border-radius: 9999px; /* Oval pill edges exactly as in picture */
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px var(--color-primary-glow, rgba(28, 123, 255, 0.28));
  border: none;
  cursor: pointer;
}

.candidate-view-profile-btn:hover {
  background-color: var(--color-primary-hover, #753be3);
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(28, 123, 255, 0.38);
  transform: translateY(-1px);
}

.candidate-view-profile-btn:active {
  background-color: #632cd4;
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(28, 123, 255, 0.25);
}

/* Candidate Save Bookmark Button at Top-Right of Card (Neutral without color) */
.candidate-save-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.candidate-save-btn:hover {
  color: #ef4444;
  border-color: #fca5a5;
  background: #fef2f2;
  transform: scale(1.08);
}

.candidate-save-btn.saved {
  color: #ef4444;
  border-color: #fca5a5;
  background: #fef2f2;
}

.candidate-save-btn svg {
  display: block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), fill 0.2s ease;
}

.candidate-save-btn:active svg {
  transform: scale(0.85);
}

