/* Basis layout */
.ajb-form { max-width: 780px; margin: 24px auto; padding: 20px; border: 1px solid #e5e7eb; border-radius: 12px; background:#fff; }
.ajb-field, .ajb-field-inline > div { margin-bottom: 16px; }
.ajb-field label, .ajb-field-inline label { font-weight: 600; display:block; margin-bottom:6px; }
.ajb-field input[type="text"],
.ajb-field input[type="number"],
.ajb-field input[type="email"],
.ajb-field select,
.ajb-field textarea { width:100%; padding:10px; border:1px solid #d1d5db; border-radius:8px; }

.ajb-field-inline { display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
.req { color:#ef4444; margin-left:4px; }

/* Buttons & alerts */
.ajb-btn, .ajb-apply-btn, #ajb-filter-form button[type="submit"] {
  display:inline-block; padding:10px 16px; border-radius:10px; border:0; background:#111827; color:#fff; cursor:pointer;
}
.ajb-btn:hover, .ajb-apply-btn:hover, #ajb-filter-form button[type="submit"]:hover { opacity:.9; }

.ajb-alert { padding:12px 14px; border-radius:10px; margin:12px 0; }
.ajb-success { background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.ajb-error   { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }

/* Cards & listings */
.ajb-listings { display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap:16px; margin-top:16px; }
.ajb-card { border:1px solid #e5e7eb; border-radius:12px; padding:16px; background:#fff; }
.ajb-card h3 { margin:0 0 8px; font-size:1.05rem; }
.ajb-card p { margin:6px 0; color:#374151; }

.ajb-badge { display:inline-block; font-size:.75rem; padding:3px 8px; border-radius:9999px; background:#e0f2fe; color:#0369a1; margin-bottom:8px; }

/* Results area */
#ajb-results p { margin:8px 0; }

/* Responsive */
@media (max-width: 640px) {
  .ajb-field-inline { grid-template-columns: 1fr; }
}
/* --- Layout --- */
.ajb-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}
.ajb-sidebar {
  position: sticky;
  top: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}
.ajb-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.ajb-sidebar-close { display:none; border:0; background:transparent; font-size:18px; cursor:pointer; }
.ajb-content { min-width: 0; }
.ajb-content-bar {
  display:flex; align-items:center; justify-content:space-between; margin-bottom: 12px;
}
.ajb-content-title { margin:0; font-size:1.25rem; }
.ajb-filter-toggle { display:none; border:1px solid #e5e7eb; background:#fff; padding:8px 12px; border-radius:8px; cursor:pointer; }

/* --- Form polish --- */
.ajb-checkbox { display:flex; gap:8px; align-items:center; margin:6px 0; }
.ajb-btn-full { width:100%; margin-top:6px; }
fieldset legend { font-weight:700; margin-bottom:6px; }
.ajb-field { margin-bottom:14px; }

/* --- Cards --- */
.ajb-card {
  border:1px solid #e5e7eb; border-radius:14px; padding:16px; background:#fff;
  transition: box-shadow .15s ease, transform .05s ease;
}
.ajb-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.06); transform: translateY(-1px); }
.ajb-card h3 { margin:0 0 6px; font-size:1.05rem; }
.ajb-card h3 a { text-decoration:none; }

/* --- Results grid on the right --- */
#ajb-results .ajb-listings {
  display:grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap:16px; margin-top:12px;
}

/* --- Adzuna badge/button --- */
.ajb-badge { display:inline-block; font-size:.72rem; padding:3px 8px; border-radius:9999px; background:#e0f2fe; color:#0369a1; margin:2px 0 8px; }
.ajb-apply-btn { display:inline-block; padding:9px 14px; border-radius:10px; border:0; background:#111827; color:#fff; text-decoration:none; }

/* --- Mobile: sidebar becomes slide-over --- */
@media (max-width: 900px) {
  .ajb-layout { grid-template-columns: 1fr; }
  .ajb-filter-toggle { display:inline-block; }
  .ajb-sidebar {
    position: fixed; inset: 0 0 0 auto; /* right side by default */
    width: 88%; max-width: 360px; transform: translateX(110%);
    transition: transform .2s ease; z-index: 1000; box-shadow: -6px 0 24px rgba(0,0,0,.1);
  }
  body.ajb-sidebar-open .ajb-sidebar { transform: translateX(0); }
  .ajb-sidebar-close { display:inline-block; }
  /* dark overlay behind */
  body.ajb-sidebar-open::after {
    content:""; position:fixed; inset:0; background:rgba(0,0,0,.35); z-index: 999;
  }
}

/* Optional: nicer pagination if you render it server-side */
.ajb-pagination { display:flex; gap:8px; margin-top:14px; flex-wrap:wrap; }
.ajb-pagination a, .ajb-pagination span {
  display:inline-block; padding:8px 12px; border:1px solid #e5e7eb; border-radius:10px; text-decoration:none;
}
.ajb-pagination .is-active { background:#111827; color:#fff; border-color:#111827; }

#ajb-filter-form {
    max-width: 247px !important;
}


