/* ==========================================================================
   YellowPin Custom UI Select Component & Unified Filters
   ========================================================================== */
.yp-ui-select {
  position: relative;
  display: inline-block;
  user-select: none;
  font-family: inherit;
  vertical-align: middle;
}

.yp-ui-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 165px;
  height: 42px;
  padding: 0 16px;
  background: #ffffff;
  border: 1px solid #d8dfe8;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
  white-space: nowrap;
  outline: none;
}

.yp-ui-select-trigger:hover {
  border-color: #fabc57;
  background: #fffdfa;
}

.yp-ui-select.is-open .yp-ui-select-trigger {
  border-color: #fabc57;
  box-shadow: 0 0 0 3px rgba(250, 188, 87, 0.22);
  background: #ffffff;
}

.yp-ui-select-label {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yp-ui-select-arrow {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.yp-ui-select.is-open .yp-ui-select-arrow {
  transform: rotate(180deg);
  color: #fabc57;
}

.yp-ui-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-height: 280px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  padding: 6px;
  z-index: 1060;
  display: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  scrollbar-width: thin;
  scrollbar-color: #fabc57 #f8fafc;
}

.yp-ui-select.align-right .yp-ui-select-menu {
  left: auto;
  right: 0;
}

.yp-ui-select.is-open .yp-ui-select-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.yp-ui-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.yp-ui-select-option:hover {
  background: #fff8eb;
  color: #8f6010;
}

.yp-ui-select-option.is-selected {
  background: #fff3de;
  color: #8f6010;
  font-weight: 600;
}

.yp-ui-select-check {
  font-size: 11px;
  color: #fabc57;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.yp-ui-select-option.is-selected .yp-ui-select-check {
  opacity: 1;
}

/* Candidate Listing integration */
.yp-cl-side-field .yp-ui-select {
  width: 100%;
}
.yp-cl-side-field .yp-ui-select-trigger {
  width: 100%;
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
  height: 42px;
}
.yp-cl-side-field .yp-ui-select-trigger:hover {
  background: transparent;
}

/* ==========================================================================
   YellowPin Refined & Unified Filter Design System
   ========================================================================== */
.yp-jl-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.yp-jl-filters-head h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.02em;
}

.yp-jl-filters-head p {
  font-size: 13px;
  color: #64748b;
  margin: 2px 0 0;
}

.yp-jl-clear-filters {
  font-size: 13px;
  font-weight: 600;
  color: #d97706;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.yp-jl-clear-filters:hover {
  color: #b45309;
  text-decoration: underline;
}

.yp-jl-filter-panels {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yp-jl-filter-panel {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.yp-jl-filter-panel:hover {
  border-color: #fabc57;
  box-shadow: 0 4px 14px rgba(250, 188, 87, 0.1);
}

.yp-jl-filter-panel.is-active {
  background: #fffdfa;
  border-color: rgba(250, 188, 87, 0.5);
  box-shadow: 0 2px 8px rgba(250, 188, 87, 0.12);
}

.yp-jl-filter-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: background 0.15s ease;
}

.yp-jl-filter-toggle:hover {
  background: #fafbfc;
}

.yp-jl-filter-panel.is-active .yp-jl-filter-toggle:hover {
  background: #fff9ee;
}

.yp-jl-filter-toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.yp-jl-filter-panel.is-active .yp-jl-filter-toggle-left {
  color: #8f6010;
  font-weight: 700;
}

.yp-jl-filter-toggle-left i {
  color: #fabc57;
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.yp-jl-filter-chevron {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.yp-jl-filter-panel.is-open .yp-jl-filter-chevron {
  transform: rotate(180deg);
  color: #fabc57;
}

.yp-jl-filter-body {
  display: none;
  padding: 4px 14px 14px 14px;
}

.yp-jl-filter-panel.is-open .yp-jl-filter-body {
  display: block;
}

/* Polished Search Box with Integrated Search Icon */
.yp-jl-filter-search {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  background-color: #f8fafc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 11px center;
}

.yp-jl-filter-search:focus {
  background-color: #ffffff;
  border-color: #fabc57;
  box-shadow: 0 0 0 3px rgba(250, 188, 87, 0.18);
}

.yp-jl-filter-search::placeholder {
  color: #94a3b8;
  font-size: 12.5px;
}

/* Clean, Sleek Scrollbar - No Clunky Arrows */
.yp-jl-filter-list {
  list-style: none;
  margin: 0;
  padding: 4px 6px 4px 0;
  max-height: 230px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.yp-jl-filter-list::-webkit-scrollbar {
  width: 4px;
}

.yp-jl-filter-list::-webkit-scrollbar-track {
  background: transparent;
}

.yp-jl-filter-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.yp-jl-filter-list::-webkit-scrollbar-thumb:hover {
  background: #fabc57;
}

.yp-jl-filter-list::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.yp-jl-filter-list li {
  margin-bottom: 2px;
}

.yp-jl-filter-list li:last-child {
  margin-bottom: 0;
}

/* Top-Aligned Checkboxes & Clean Multi-Line Text */
.yp-jl-filter-list label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
  transition: background 0.15s ease, color 0.15s ease;
}

.yp-jl-filter-list label:hover {
  background: #fff8eb;
  color: #8f6010;
}

.yp-jl-filter-list label span:not(.count) {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.yp-jl-filter-list input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #fabc57;
  border-radius: 4px;
  cursor: pointer;
  margin: 2.5px 0 0 0;
  flex-shrink: 0;
}

/* Polished Count Pill Badge */
.yp-jl-filter-list span.count,
.yp-jl-filter-list .count {
  margin-left: auto;
  min-width: 20px;
  text-align: center;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 9999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  align-self: flex-start;
  margin-top: 1px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.yp-jl-filter-list label:hover span.count,
.yp-jl-filter-list label:hover .count {
  background: #ffeac2;
  color: #8f6010;
}

.yp-jl-filter-list input[type="checkbox"]:checked ~ span.count,
.yp-jl-filter-list input[type="checkbox"]:checked ~ .count {
  background: #fff3de;
  color: #8f6010;
}

.yp-jl-filter-list label:has(input[type="checkbox"]:checked) {
  color: #0f172a;
  font-weight: 600;
}

.yp-jl-filter-no-results {
  font-size: 13px;
  color: #94a3b8;
  padding: 10px 8px;
  text-align: center;
  font-style: italic;
}

select[data-yp-ui-ready="1"] { display: none !important; }


/* ==========================================================================
   Sticky Filter Sidebar & Smooth Scroll Boundary
   ========================================================================== */
@media (min-width: 992px) {
  /* Parent containers: allow sticky items to slide and not stretch */
  .yp-jl-board-grid {
    min-height: calc(100vh - 100px) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr) !important;
    align-items: start !important;
  }

  .yp-cl-layout {
    display: grid !important;
    grid-template-columns: 300px minmax(0, 1fr) !important;
    align-items: start !important;
  }

  .yp-eg-layout {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    align-items: start !important;
  }

  .yp-events-page .row,
  .yp-courses-page .row,
  .yp-eg-page .row {
    align-items: flex-start !important;
  }

  /* Sticky Sidebars */
  .yp-jl-sidebar,
  .yp-events-sidebar,
  .yp-courses-sidebar,
  .yp-cl-sidebar,
  .yp-eg-sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    align-self: flex-start !important;
    z-index: 20;
    transition: top 0.12s ease-out;
    will-change: top;
  }
}

/* Prevent scroll chaining from filter sidebar and dropdown menus to page */
.yp-jl-sidebar,
.yp-events-sidebar,
.yp-courses-sidebar,
.yp-cl-sidebar,
.yp-eg-sidebar,
.yp-jl-filter-panels,
.yp-jl-filter-list,
.yp-ui-select-menu {
  overscroll-behavior: contain !important;
}

#jlJobList, #ajJobList, #jgJobList {
  min-height: 420px;
}
