/* StrayJobs V2 Visual Redesign Layer (Non-destructive; easily reverted) */

:root {
    --sj-royal: #005AD4;
    --sj-navy: #012b67;
    --sj-emerald: #11AB7C;
    --sj-emerald-dark: #0f7b4c;
    --sj-amber: #F59E0B;
    --sj-ink: #0f172a;
    --sj-muted: #506690;
    --sj-border: #e2e8f0;
}

/* Navbar Gold/Amber Primary CTA matching homepage mockup */
.btn-sj-cta {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    border-color: #f59e0b !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
@media (hover: hover) {
    .btn-sj-cta:hover {
        background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%) !important;
        color: #012b67 !important;
    }
}

/* Hero & White Pill Search Bar */
.sj-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    padding-top: 7.5rem;
    padding-bottom: 5.5rem;
    color: #fff;
    overflow: hidden;
}
.sj-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(1, 24, 61, 0.72) 0%, rgba(1, 43, 103, 0.84) 55%, rgba(0, 90, 212, 0.88) 100%);
    z-index: 0;
}
.sj-hero > .container {
    position: relative;
    z-index: 1;
}
.sj-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    color: #fde68a;
    font-size: 0.82rem;
    font-weight: 600;
}
.sj-pill-search {
    background: #fff;
    border-radius: 999px;
    padding: 0.4rem 0.45rem 0.4rem 1.2rem;
    box-shadow: 0 18px 40px rgba(1, 24, 61, 0.34);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 720px;
    margin: 0 auto;
}
.sj-pill-search input {
    border: 0 !important;
    box-shadow: none !important;
    font-size: 0.96rem;
    color: #0f172a;
    flex: 1;
    min-width: 0;
    padding: 0.4rem 0.25rem;
}
.sj-pill-search__geo {
    border: 0;
    background: #f1f5f9;
    color: #012b67;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.sj-pill-search__submit {
    border-radius: 999px !important;
    padding: 0.55rem 1.4rem !important;
    font-weight: 700 !important;
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .sj-pill-search {
        flex-wrap: wrap;
        border-radius: 1rem;
        padding: 0.65rem;
    }
    .sj-pill-search input {
        width: 100%;
        flex: 1 0 100%;
    }
    .sj-pill-search__geo, .sj-pill-search__submit {
        flex: 1;
        text-align: center;
    }
}

/* Floating 8-Category Strip */
.sj-cat-strip {
    margin-top: -2.75rem;
    position: relative;
    z-index: 3;
}
.sj-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: #fff;
    border: 1px solid #e6edf7;
    border-radius: 0.9rem;
    padding: 0 0.5rem 0.85rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    height: 100%;
    overflow: hidden;
    text-decoration: none !important;
}
.sj-cat-card__thumb {
    width: calc(100% + 1rem);
    margin: 0 -0.5rem -1.25rem;
    height: 68px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.sj-cat-card__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.32) 100%);
}
.sj-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.45rem;
    position: relative;
    z-index: 1;
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

/* Top Cities Photo / Gradient Cards */
.sj-city-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 132px;
    border-radius: 0.95rem;
    padding: 0.9rem 1rem;
    color: #fff !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14);
    text-decoration: none !important;
}
.sj-city-card--photo {
    background-size: cover !important;
    background-position: center !important;
}
.sj-city-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.16), transparent 55%);
    pointer-events: none;
}
.sj-city-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
}
.sj-city-count-pill {
    background: rgba(255, 255, 255, 0.92);
    color: #012b67;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
}

/* Company Brand Monogram / Logo Tiles */
.sj-logo-tile {
    width: 46px;
    height: 46px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: -0.02em;
    flex: none;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.1);
}
.sj-logo-tile--sm {
    width: 36px;
    height: 36px;
    border-radius: 0.55rem;
    font-size: 0.75rem;
}
.sj-logo-tile--lg {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    font-size: 1.25rem;
}
.sj-logo-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sj-logo-tile--has-logo {
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    padding: 5px;
}
.sj-logo-tile--has-logo img {
    object-fit: contain;
}
.sj-job-cover {
    height: 175px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.sj-job-cover__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.56) 100%);
}
.sj-job-cover__badge {
    position: relative;
    z-index: 1;
}
.sj-job-header-logo {
    margin-top: -2.25rem;
    position: relative;
    z-index: 2;
    border: 3px solid #ffffff;
}

/* Pills & Badges */
.sj-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.25;
}
.sj-pay-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.65rem;
    border-radius: 999px;
    background: #11AB7C;
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}
.sj-pay-pill--muted {
    background: #eef3fb;
    color: #012b67;
}
.sj-verified-icon {
    color: #005AD4;
    font-size: 0.85em;
    margin-left: 0.25rem;
}

/* Interactive Card Hover Motion */
.sj-card {
    border: 1px solid #e6edf7 !important;
    border-radius: 0.95rem !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .sj-card, .sj-cat-card, .sj-city-card {
        transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
    }
    .sj-card:hover, .sj-cat-card:hover, .sj-city-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(0, 90, 212, 0.12) !important;
    }
}

/* Pay-Tier Map Teardrop Pins (Google Maps & MapLibre) */
.sj-map-pin-wrap {
    position: relative;
    cursor: pointer;
    transform: translate(-50%, -100%);
    user-select: none;
}
.sj-map-pin {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 30px;
    padding: 0 9px;
    border-radius: 999px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}
.sj-map-pin__icon {
    font-size: 9px;
    margin-right: 4px;
    opacity: 0.92;
}
.sj-map-pin::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 9px;
    height: 9px;
    background: inherit;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}
.sj-map-pin--top { background: #11AB7C; }
.sj-map-pin--mid { background: #005AD4; }
.sj-map-pin--base { background: #012b67; }

.pin-active .sj-map-pin,
.sj-map-pin-wrap:hover .sj-map-pin {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 90, 212, 0.42);
}
@media (prefers-reduced-motion: no-preference) {
    .sj-map-pin {
        transition: transform 140ms ease, box-shadow 140ms ease;
    }
}

/* Floating Category Chip Strip on /search */
.sj-map-chips {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 35;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    max-width: calc(100% - 290px);
    overflow-x: auto;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.14);
    scrollbar-width: none;
}
.sj-map-chips::-webkit-scrollbar { display: none; }
.sj-map-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #1e293b;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 150ms ease, filter 150ms ease;
}
.sj-map-chip__count {
    font-size: 0.66rem;
    font-weight: 700;
    opacity: 0.78;
    font-variant-numeric: tabular-nums;
    margin-left: 0.1rem;
}
.sj-map-chip.is-active {
    background: var(--cat-pin, #005AD4) !important;
    color: #fff !important;
    border-color: var(--cat-pin, #005AD4) !important;
}
.sj-map-chip.is-active .sj-map-chip__count {
    opacity: 0.92;
}
.sj-map-chip.is-empty {
    opacity: 0.38;
    filter: grayscale(0.55);
}
.sj-map-chip.is-empty:hover {
    opacity: 0.75;
}
.sj-search-area-btn {
    top: 60px !important;
}
@media (max-width: 991.98px) {
    .sj-map-chips {
        max-width: calc(100% - 24px);
    }
}

/* Accessible Switch control styling */
.sj-switch-input {
    accent-color: #005AD4;
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

/* Sidebar Job Card Enhancements */
.job-item.sj-job-row {
    display: block;
    padding: 0.85rem 0.95rem;
    border-bottom: 1px solid #eef2f7;
    text-decoration: none !important;
}
.job-item.sj-job-row:hover,
.job-item.sj-job-row.is-highlighted {
    background: #f0f6ff;
}
.job-item.sj-job-row.is-selected {
    background: #eaf3ff;
    box-shadow: inset 3px 0 0 #005AD4;
}

/* Job Detail Pay Callout & Rescue Card */
.sj-pay-callout {
    background: #ecfdf5;
    border: 1.5px solid #6ee7b7;
    color: #065f46;
    border-radius: 0.85rem;
    padding: 0.85rem 1.15rem;
    font-weight: 700;
    font-size: 1.05rem;
}
.sj-rescue-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.95rem;
    padding: 1rem;
}
.sj-rescue-card__img {
    width: 84px;
    height: 84px;
    border-radius: 0.75rem;
    object-fit: cover;
    flex: none;
    box-shadow: 0 4px 10px rgba(120, 53, 15, 0.15);
}

/* Hourly vs Salary 3-Way Segmented Switch & Salary Badges */
.sj-pay-switch {
    display: inline-flex;
    align-items: center;
    background: #eef3fb;
    border: 1px solid #d5e0f2;
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
}
.sj-pay-switch--full {
    display: flex;
    width: 100%;
}
.sj-pay-switch--hero {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(6px);
}
.sj-pay-switch__btn {
    border: 0;
    background: transparent;
    color: #334155;
    border-radius: 999px;
    padding: 0.26rem 0.65rem;
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.25;
}
.sj-pay-switch--full .sj-pay-switch__btn {
    flex: 1;
    text-align: center;
    padding: 0.28rem 0.35rem;
    font-size: 0.71rem;
}
.sj-pay-switch--hero .sj-pay-switch__btn {
    color: #e2e8f0;
    padding: 0.36rem 0.9rem;
    font-size: 0.78rem;
}
.sj-pay-switch__btn.is-active {
    background: #005AD4;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 90, 212, 0.28);
}
.sj-pay-switch--hero .sj-pay-switch__btn.is-active {
    background: #ffffff;
    color: #012b67 !important;
}
.sj-pay-pill--salary {
    background: #4338CA !important;
    color: #ffffff !important;
}
.sj-pay-type-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 1px 6px;
}
.sj-pay-type-tag--salary {
    background: #eef2ff;
    color: #4338ca;
}
.sj-pay-type-tag--hourly {
    background: #ecfdf5;
    color: #047857;
}

/* Remote / Work-at-Home Mode */
.sj-remote-chip {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
    --cat-pin: #059669;
}
.sj-remote-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 1px 6px;
    background: #d1fae5;
    color: #065f46;
}
.sj-remote-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    background: #ecfdf5;
    border-bottom: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.76rem;
    font-weight: 600;
}
.sj-remote-banner.is-active {
    background: #065f46;
    border-bottom-color: #064e3b;
    color: #ecfdf5;
}
.sj-remote-banner__btn {
    border: 1px solid rgba(4, 120, 87, 0.28);
    background: #ffffff;
    color: #047857;
    border-radius: 999px;
    padding: 0.16rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
.sj-remote-banner.is-active .sj-remote-banner__btn {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}
@media (min-width: 992px) {
    .home-map-container.split-view.is-remote-mode .job-container {
        flex: 0 0 560px;
        max-width: 56%;
        width: auto;
    }
}

/* Spatial Cluster Count Bubbles */
.sj-map-cluster {
    position: relative;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(1, 43, 103, 0.84);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.92);
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
    user-select: none;
    transition: transform 140ms ease, background 140ms ease;
}
.sj-map-cluster--ml {
    transform: none;
}
.sj-map-cluster--md {
    min-width: 34px;
    height: 34px;
    font-size: 11.5px;
    background: rgba(0, 90, 212, 0.88);
}
.sj-map-cluster--lg {
    min-width: 40px;
    height: 40px;
    font-size: 12px;
    background: rgba(17, 171, 124, 0.9);
}
.sj-map-cluster:hover {
    transform: translate(-50%, -50%) scale(1.12);
    z-index: 20;
}
.sj-map-cluster--ml:hover {
    transform: scale(1.12);
    z-index: 20;
}
.sj-map-pin-wrap {
    z-index: 10;
}


