/* ============================================================
   FILTER PANEL (v32) — U-Pass üslublu sağdan açılan filtr paneli.
   Təqaüdlər və Universitetlər səhifələrində paylaşılır.
   Rəng paleti saytın öz tokenlərinə uyğundur.
   ============================================================ */

/* --- Search + Filter trigger bar --- */
.fp-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}
/* .ul-search has a stray margin-bottom from its standalone context — zero it
   inside the bar so the search and Filter button align on the same line. */
.fp-bar .ul-search { flex: 1 1 auto; margin: 0; min-width: 0; }
.fp-trigger { min-height: 52px; }

.fp-trigger {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  padding: 13px 22px;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.fp-trigger svg { width: 17px; height: 17px; stroke: currentColor; flex-shrink: 0; }
.fp-trigger:hover {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(26, 26, 77, 0.08);
}
.fp-trigger .fp-trigger-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

/* --- Overlay backdrop --- */
.fp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 77, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms var(--ease), visibility 280ms var(--ease);
  z-index: 1400;
}
.fp-overlay.is-open { opacity: 1; visibility: visible; }

/* --- Slide-out panel --- */
.fp-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 400px;
  max-width: 90vw;
  background: var(--card-bg, #FAF8F3);
  box-shadow: -18px 0 50px rgba(26, 26, 77, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 320ms var(--ease-out), visibility 320ms var(--ease-out);
  z-index: 1401;
  border-top-left-radius: 26px;
  border-bottom-left-radius: 26px;
  overflow: hidden;
}
.fp-panel.is-open { transform: translateX(0); visibility: visible; }

.fp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 26px 18px;
  flex-shrink: 0;
}
.fp-head h3 {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.fp-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--inner-2, #ECECF3);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.fp-close svg { width: 16px; height: 16px; stroke: currentColor; }
.fp-close:hover { background: #e0e0ea; transform: rotate(90deg); }

.fp-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.fp-section { display: flex; flex-direction: column; gap: 12px; }
.fp-section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.fp-section .ul-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.fp-foot {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  padding: 16px 26px;
  border-top: 1px solid var(--border);
  background: var(--card-bg, #FAF8F3);
}
.fp-reset, .fp-apply {
  flex: 1 1 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  border-radius: var(--r-pill);
  padding: 13px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.fp-reset {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--ink);
}
.fp-reset:hover { border-color: var(--brand); color: var(--brand); }
.fp-apply {
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  box-shadow: var(--shadow-pill);
}
.fp-apply:hover { filter: brightness(1.07); transform: translateY(-2px); }

/* --- Field components inside the panel (U-Pass style) --- */
.fp-input,
.fp-select {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 13px 16px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.fp-input::placeholder { color: var(--mute); }
.fp-input:focus,
.fp-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(91, 79, 207, 0.10);
}
.fp-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B8DA6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* Toggle chips — multi-select, no count (U-Pass degree/type/form pills) */
.fp-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.fp-chip {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-2, #4A4A66);
  background: var(--inner-2, #ECECF3);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.fp-chip:hover { color: var(--brand); }
.fp-chip.is-on {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
}

/* Range slider — Təhsil haqqı */
.fp-range-vals {
  display: flex;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 4px;
}
.fp-range-vals .fp-range-max { color: var(--brand); }
.fp-range {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--inner-2, #ECECF3);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.fp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(26, 26, 77, 0.25);
  cursor: pointer;
}
.fp-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand);
  border: 3px solid #fff;
  cursor: pointer;
}

.fp-section-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--mute);
}

@media (max-width: 560px) {
  .fp-panel { width: 100%; max-width: 100%; border-radius: 0; }
  .fp-trigger { padding: 12px 16px; }
}
