/* ── Platform badge colours ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-wordpress   { background: #ebf5fb; color: #1a6e99; border: 1px solid #b3d9ed; }
.badge-webflow     { background: #eef0ff; color: #3544cc; border: 1px solid #c4caff; }
.badge-shopify     { background: #f0f9eb; color: #3a7d1e; border: 1px solid #c3e6a0; }
.badge-framer      { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-squarespace { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.badge-cms         { background: #fdf4ff; color: #7c3aed; border: 1px solid #e9d5ff; }
.badge-default     { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }

/* ── Job type pill ───────────────────────────────────────────────────────────── */
.type-pill {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: capitalize;
    border: 1px solid;
}
.type-hourly   { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.type-fixed    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.type-fulltime { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.type-contract { background: #fdf4ff; color: #7c3aed; border-color: #e9d5ff; }
.type-parttime { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.type-unknown  { background: #f9fafb; color: #9ca3af; border-color: #e5e7eb; }

/* ── Company avatar circle ───────────────────────────────────────────────────── */
.company-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f4f8 100%);
    color: #4b6cb7;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Job card ────────────────────────────────────────────────────────────────── */
.job-card {
    transition: box-shadow 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
    border: 1px solid #e5e7eb;
}
.job-card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #c7d2fe;
}

/* ── Skeleton shimmer ────────────────────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f2f5 25%, #e4e8ee 50%, #f0f2f5 75%);
    background-size: 400px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

/* ── Sticky filter sidebar ───────────────────────────────────────────────────── */
@media (min-width: 1024px) {
    #filter-sidebar {
        position: sticky;
        top: 5.5rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #d1d5db transparent;
    }
    #filter-sidebar::-webkit-scrollbar { width: 4px; }
    #filter-sidebar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
}

/* ── Active filter chip ──────────────────────────────────────────────────────── */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 3px 10px 3px 10px;
    cursor: pointer;
    transition: background 0.1s;
}
.filter-chip:hover { background: #dbeafe; }
.filter-chip .chip-x {
    font-size: 0.8rem;
    line-height: 1;
    color: #93c5fd;
    margin-left: 1px;
}

/* ── Filter section toggle ───────────────────────────────────────────────────── */
.filter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}
.filter-section-header:hover .section-label { color: #2563eb; }
.filter-toggle-icon {
    font-size: 0.65rem;
    color: #9ca3af;
    transition: transform 0.2s;
}
.filter-toggle-icon.open { transform: rotate(180deg); }

/* ── Mobile filter drawer ────────────────────────────────────────────────────── */
#filter-drawer {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
}
#filter-drawer.open { pointer-events: all; }
#filter-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}
#filter-drawer.open #filter-drawer-overlay { opacity: 1; }
#filter-drawer-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px 20px 32px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
#filter-drawer.open #filter-drawer-panel { transform: translateY(0); }

/* ── Stats bar ───────────────────────────────────────────────────────────────── */
.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
}
.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Source badge in card ────────────────────────────────────────────────────── */
.source-tag {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 2px 6px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Checkbox & radio custom style ──────────────────────────────────────────── */
.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #374151;
    transition: background 0.1s;
}
.filter-label:hover { background: #f3f4f6; }
.filter-label input { accent-color: #2563eb; }
.filter-label input:checked ~ .filter-label-text { color: #1d4ed8; font-weight: 600; }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.page-btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.1s;
}
.page-btn:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.page-btn.active { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }

/* ── View button ─────────────────────────────────────────────────────────────── */
.view-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 7px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s;
    letter-spacing: 0.01em;
}
.view-btn:hover { background: #1d4ed8; }

/* ── Filter count badge ──────────────────────────────────────────────────────── */
.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: #2563eb;
    color: #fff;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0 5px;
}

/* ── Line clamp ──────────────────────────────────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
