/*
 * Deliberately small — the active theme's own Bootstrap CSS handles the
 * grid, buttons, cards, and form controls. This file only covers what
 * Bootstrap doesn't: the sidebar filter box, job meta styling, the vanilla
 * modal (no Bootstrap JS dependency), and the skeleton shimmer.
 */

/* Sidebar filter box */
.job-board-widget .jb-filters-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
  position: sticky;
  top: 20px;
}

.job-board-widget .jb-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}
.job-board-widget .jb-search-input { padding-left: 36px; padding-right: 36px; }
.job-board-widget .jb-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 1;
  background-color: #999;
  border-radius: 50%;
}
.job-board-widget .jb-search-clear:hover { background-color: #666; }

.job-board-widget .jb-employer-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: #fff;
  padding: 8px;
}
.job-board-widget .jb-employer-list .form-check { padding: 6px 8px; border-radius: 4px; }
.job-board-widget .jb-employer-list .form-check:hover { background-color: #f0f0f0; }

/* Job cards */
.job-board-widget .jb-card { transition: transform .2s ease, box-shadow .2s ease; }
.job-board-widget .jb-card:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .08); }

.job-board-widget .jb-logo {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
}
.job-board-widget .jb-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.job-board-widget .jb-meta-row { font-size: .8125rem; color: #666; }
.job-board-widget .jb-meta-item { display: inline-flex; align-items: center; gap: 5px; }
.job-board-widget .jb-meta-item.jb-meta-remote { color: #198754; font-weight: 600; }

/* No-jobs / pagination bars */
.job-board-widget .jb-no-jobs-card {
  max-width: 500px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 2.5rem 2rem;
}
.job-board-widget .jb-no-jobs-icon { font-size: 3rem; color: #999; }

.job-board-widget .jb-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

/* Skeleton loading cards — greyed-out blocks with a shimmer sweeping
   across, in the same grid the real job cards will fill. */
.job-board-widget .jb-skeleton-card { pointer-events: none; }
.job-board-widget .jb-skeleton {
  background: linear-gradient(90deg, #e9ecef 25%, #f3f4f6 37%, #e9ecef 63%);
  background-size: 400% 100%;
  animation: jb-shimmer 1.4s ease infinite;
  border-radius: 4px;
}
.job-board-widget .jb-skeleton-logo { width: 64px; height: 64px; border-radius: 8px; }
.job-board-widget .jb-skeleton-line { height: 14px; }
.job-board-widget .jb-skeleton-title { height: 18px; width: 60%; }
.job-board-widget .jb-skeleton-line-sm { width: 40%; }
@keyframes jb-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .job-board-widget .jb-skeleton { animation: none; background-position: 50% 50%; }
}

/* Vanilla modal visibility + backdrop (submission iframe) */
.job-board-widget .modal { position: fixed; inset: 0; z-index: 1050; display: none; padding: 1rem; overflow-y: auto; background: transparent; }
.job-board-widget .modal.show { display: block; }
.job-board-widget .modal-dialog { margin: 1.5rem auto; max-width: 600px; pointer-events: none; }
.job-board-widget .modal-dialog.modal-lg { max-width: 1000px; }
.job-board-widget .modal-dialog.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 3rem); }
.job-board-widget .jb-modal-content {
  pointer-events: auto;
  position: relative;
  height: 85vh;
  max-height: 800px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
  overflow: hidden;
}
.job-board-widget .jb-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background-color: rgba(255, 255, 255, .9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.jb-backdrop { position: fixed; inset: 0; background-color: #000; opacity: .5; z-index: 1040; }
body.jb-modal-open { overflow: hidden; }

@media (max-width: 991.98px) {
  .job-board-widget .jb-filters-card { position: static; }
}
