/*
 * JobFlexy Universal Job Listings Widget v1.1 – CSS
 */

/* ========== FILTER BAR ========== */
.jf-filter-wrap {
  margin: 0 0 0;
  position: relative;
}

.jf-filter-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  position: relative;
  transition: border-color 0.2s;
}
.jf-filter-bar.open {
  border-color: #f58220;
  border-radius: 8px 8px 0 0;
}

.jf-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  width: 100%;
  font-family: inherit;
}
.jf-filter-btn i.fa-map-marker-alt {
  color: #f58220;
  font-size: 1rem;
}
.jf-filter-btn .jf-chevron {
  margin-left: auto;
  color: #999;
  font-size: 0.75rem;
  transition: transform 0.2s;
}
.jf-filter-bar.open .jf-filter-btn .jf-chevron {
  transform: rotate(180deg);
}
.jf-filter-badge {
  background: #f58220;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
}

.jf-jobs-count-label {
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
  padding-right: 16px;
  white-space: nowrap;
}

/* ========== DROPDOWN ========== */
.jf-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -2px;
  right: -2px;
  background: #fff;
  border: 2px solid #f58220;
  border-top: 1px solid #eee;
  border-radius: 0 0 8px 8px;
  z-index: 1000;
  max-height: 320px;
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.jf-dropdown.open {
  display: flex;
}

.jf-dropdown-search-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  background: #fff;
  z-index: 2;
}
.jf-dropdown-search {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.jf-dropdown-search:focus {
  border-color: #f58220;
}
.jf-dropdown-search-wrap > i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  font-size: 0.82rem;
}

.jf-dropdown-list {
  overflow-y: auto;
  flex: 1;
  padding: 4px 0;
}
.jf-dropdown-list::-webkit-scrollbar { width: 6px; }
.jf-dropdown-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.jf-option {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.9rem;
  color: #444;
}
.jf-option:hover {
  background: #fff7ef;
}
.jf-option.active {
  background: #fff1e3;
  color: #d4690e;
  font-weight: 600;
}
.jf-option .jf-opt-name {
  flex: 1;
}
.jf-option .jf-opt-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: #999;
  background: #f3f3f3;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}
.jf-option.active .jf-opt-count {
  background: #f58220;
  color: #fff;
}
.jf-option i.fa-check {
  display: none;
  color: #f58220;
  margin-right: 10px;
  font-size: 0.8rem;
}
.jf-option.active i.fa-check {
  display: inline;
}

.jf-dropdown-empty {
  display: none;
  padding: 20px 16px;
  text-align: center;
  color: #aaa;
  font-size: 0.88rem;
}

/* Hint — sits outside filter-wrap, no gap issues */
.jf-filter-hint {
  margin: 8px 0 16px;
  font-size: 0.8rem;
  color: #aaa;
  font-style: italic;
}
.jf-filter-hint i {
  margin-right: 4px;
  color: #ccc;
}

/* ========== JOB CARDS ========== */
.jf-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}
.jf-banner {
  position: relative;
  display: flex;
  width: 100%;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.jf-banner__logo {
  flex: 0 0 120px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.jf-banner__logo img {
  max-width: 100%;
  height: auto;
}
.jf-banner__content {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.jf-banner__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
}
.jf-banner__title a {
  color: inherit;
  text-decoration: none;
}
.jf-banner__meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: auto;
}
.jf-banner__meta i {
  margin-right: 4px;
  color: #f58220;
}
.jf-banner__meta a {
  color: #f58220;
  text-decoration: none;
}
.jf-banner__cta {
  margin-top: 12px;
  background: #f58220;
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  align-self: flex-start;
}
.jf-banner__new {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #28a745;
  color: #fff;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 3px;
  text-transform: uppercase;
  z-index: 10;
}
.jf-loading {
  text-align: center;
  font-size: 1rem;
  color: #555;
  margin: 20px 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .jf-banner { flex-direction: column; }
  .jf-banner__logo { width: 100%; padding: 16px; }
  .jf-banner__content { padding: 16px; }
  .jf-dropdown { max-height: 260px; }
}
@media (max-width: 480px) {
  .jf-banner__cta {
    display: block;
    width: 100% !important;
    text-align: center !important;
    font-weight: bold !important;
    font-size: 1.05rem !important;
    margin: 16px 0 8px !important;
    padding: 12px 0 !important;
  }
  .jf-jobs-count-label { display: none; }
}
