/* 20260702-1320_043 */
/* jobfish_app.css - JobFish theme + layout */

:root {
    --jf-bg: #0f1923;
    --jf-text: #e0e0e0;
    --jf-border: #1e3a5f;
    --jf-card-bg: #152736;
    --jf-accent: #4fc3f7;
    --jf-accent2: #00e676;
    --jf-salary: #ffc107;
    --jf-muted: #8899aa;
    --jf-radius: 8px;
    --jf-font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.light {
    --jf-bg: #f5f7fa;
    --jf-text: #1a2744;
    --jf-border: #c5d5e8;
    --jf-card-bg: #ffffff;
    --jf-accent: #1565c0;
    --jf-accent2: #00796b;
    --jf-salary: #e65100;
    --jf-muted: #546e7a;
}
body.light .jf-banner-bg {
    opacity: 0.3;
}
body.light .jf-region-toggle {
    background: #e8eef5;
    border-color: #b0c4d8;
    color: #1a2744;
}
body.light .jf-region-menu {
    background: #ffffff;
    border-color: #c5d5e8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
body.light .jf-search-group input {
    background: #ffffff;
    border-color: #b0c4d8;
}
body.light .jf-sort-select {
    background: #e8eef5;
    border-color: #b0c4d8;
    color: #1a2744;
}
body.light .jf-job-row:hover {
    background: rgba(21,101,192,0.06);
}
body.light .jf-badge {
    border: 1px solid rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--jf-font);
    background: var(--jf-bg);
    color: var(--jf-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Banner */
.jf-banner {
    position: relative;
    padding: 24px 16px 16px;
    text-align: center;
    overflow: hidden;
}
.jf-banner-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0a1628, #1565c0, #0d2137, #00897b, #0a1628);
    background-size: 300% 300%;
    animation: jf-gradient 12s ease infinite;
    opacity: 0.6;
}
@keyframes jf-gradient {
    0%,100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.jf-banner-content { position: relative; z-index: 1; }
.jf-banner-title {
    font-size: 2em;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.jf-banner-tagline {
    font-size: 0.9em;
    opacity: 0.7;
    margin-top: 4px;
}

/* Layout */
.jf-app-layout {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 12px;
}
.jf-main { width: 100%; }

/* Toolbar */
.jf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    gap: 8px;
}
.jf-toolbar-left, .jf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.jf-toolbar-right {
    flex: 1; flex-wrap: nowrap; overflow: visible;
}
.jf-toolbar-right > .jf-region-dropdown {
    flex: 1; min-width: 0;
}
.jf-toolbar-right > .jf-region-dropdown > .jf-region-toggle {
    width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jf-filter-row {
    flex-wrap: nowrap !important; overflow: visible;
}
.jf-filter-row > .jf-region-dropdown,
.jf-filter-row > .jf-region-toggle {
    flex: 1; min-width: 0;
}
.jf-filter-row > .jf-region-dropdown > .jf-region-toggle,
.jf-filter-row > button.jf-region-toggle {
    width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.jf-tb-btn {
    cursor: pointer;
    font-size: 1.3em;
    padding: 4px;
    transition: transform 0.15s;
}
.jf-tb-btn:hover { transform: scale(1.15); }

/* Region dropdown */
.jf-region-dropdown { position: relative; }
.jf-region-toggle {
    background: var(--jf-card-bg);
    border: 1px solid var(--jf-border);
    color: var(--jf-text);
    padding: 6px 12px;
    border-radius: var(--jf-radius);
    cursor: pointer;
    font-size: 0.85em;
    font-family: var(--jf-font);
}
.jf-region-menu {
    display: none;
    position: absolute;
    right: 0; top: 100%;
    background: var(--jf-card-bg);
    border: 1px solid var(--jf-border);
    border-radius: var(--jf-radius);
    padding: 8px;
    z-index: 1000;
    min-width: 180px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.jf-region-item {
    display: block;
    padding: 4px 8px;
    font-size: 0.85em;
    cursor: pointer;
    border-radius: 4px;
}
.jf-region-item:hover { background: rgba(79,195,247,0.1); }

/* Search */
.jf-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
}
.jf-search-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.jf-search-group input {
    width: 100%;
    padding: 8px 36px 8px 12px;
    border: 1px solid var(--jf-border);
    border-radius: var(--jf-radius);
    background: var(--jf-card-bg);
    color: var(--jf-text);
    font-size: 0.9em;
    font-family: var(--jf-font);
}
.jf-search-icon {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1em;
}
.jf-filter-group { display: flex; gap: 4px; }
.jf-filter-btn {
    background: var(--jf-card-bg);
    border: 1px solid var(--jf-border);
    color: var(--jf-text);
    padding: 6px 10px;
    border-radius: var(--jf-radius);
    cursor: pointer;
    font-size: 0.85em;
    font-family: var(--jf-font);
}
.jf-filter-btn.active { border-color: var(--jf-accent); }
.jf-sort-select {
    background: var(--jf-card-bg);
    border: 1px solid var(--jf-border);
    color: var(--jf-text);
    padding: 6px 8px;
    border-radius: var(--jf-radius);
    font-size: 0.8em;
    font-family: var(--jf-font);
}

/* Panels */
.jf-panel {
    background: var(--jf-card-bg);
    border: 1px solid var(--jf-border);
    border-radius: var(--jf-radius);
    padding: 12px;
    margin-bottom: 8px;
}
.jf-panel-btn {
    background: transparent;
    border: 1px solid var(--jf-border);
    color: var(--jf-muted);
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-family: var(--jf-font);
}

/* Category chips */
.jf-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.jf-cat-chip {
    background: transparent;
    border: 1px solid var(--jf-border);
    color: var(--jf-text);
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8em;
    font-family: var(--jf-font);
    transition: background 0.15s, border-color 0.15s;
}
.jf-cat-chip:hover { background: rgba(79,195,247,0.1); }
.jf-cat-chip.active {
    background: rgba(79,195,247,0.2);
    border-color: var(--jf-accent);
    font-weight: 600;
}

/* Content panel */
.jf-content-panel { padding: 8px 0; }

/* @CST:add:H6T6:scroll_container EventSpy-style scroll container */
.jf-job-list {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(128,128,128,0.4) transparent;
    border: 1px solid var(--jf-border);
    border-radius: 0 0 var(--jf-radius) var(--jf-radius);
}
.jf-job-list::-webkit-scrollbar { width: 8px; }
.jf-job-list::-webkit-scrollbar-track { background: transparent; }
.jf-job-list::-webkit-scrollbar-thumb {
    background: rgba(128,128,128,0.4); border-radius: 4px;
}
.jf-job-list::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,0.6); }

/* List header as sticky section header */
.jf-list-header {
    position: sticky; top: 0; z-index: 5;
    background: var(--jf-card-bg);
    border: 1px solid var(--jf-border);
    border-radius: var(--jf-radius) var(--jf-radius) 0 0;
    padding: 10px 14px;
    border-bottom: 1px solid var(--jf-border);
}

/* List header */
.jf-list-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.jf-list-header h2 {
    font-size: 1.1em;
    font-weight: 700;
}
.jf-list-count {
    font-size: 0.8em;
    color: var(--jf-muted);
}

/* Job rows */
.jf-job-list { display: flex; flex-direction: column; gap: 2px; }
.jf-job-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 8px;
    border-radius: var(--jf-radius);
    cursor: pointer;
    transition: background 0.12s;
}
.jf-job-row:hover { background: rgba(79,195,247,0.06); }

.jf-job-thumb {
    width: 48px; height: 48px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(128,128,128,0.1);
    padding: 4px;
}
.jf-thumb-placeholder {
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
    border-radius: 6px;
    background: rgba(79,195,247,0.08);
}

.jf-job-title {
    font-size: 0.95em;
    font-weight: 600;
    display: block;
    line-height: 1.3;
}
.jf-job-employer {
    font-size: 0.82em;
    color: var(--jf-muted);
    margin-top: 2px;
}
.jf-job-meta {
    display: flex;
    gap: 12px;
    font-size: 0.78em;
    color: var(--jf-muted);
    margin-top: 3px;
    flex-wrap: wrap;
}
.jf-job-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Badges */
.jf-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 0.72em;
    font-weight: 500;
    white-space: nowrap;
}
.jf-badge-salary {
    background: rgba(255,193,7,0.15);
    color: var(--jf-salary);
}
.jf-badge-type {
    background: rgba(79,195,247,0.12);
    color: var(--jf-accent);
}
.jf-badge-arrangement {
    background: rgba(0,230,118,0.12);
    color: var(--jf-accent2);
}

/* Row actions */
.jf-row-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}
.jf-row-btn {
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    padding: 2px;
    transition: transform 0.12s;
}
.jf-row-btn:hover { transform: scale(1.2); }

/* Detail view */
.jf-detail { padding: 16px 0; }
.jf-detail-header h2 {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 8px;
}
.jf-detail-employer {
    font-size: 0.9em;
    color: var(--jf-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.jf-detail-logo {
    width: 32px; height: 32px;
    object-fit: contain;
    border-radius: 4px;
}
.jf-detail-link {
    text-decoration: none;
    font-size: 0.9em;
}
.jf-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85em;
    color: var(--jf-muted);
    margin: 10px 0;
    flex-wrap: wrap;
}
.jf-detail-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.jf-detail-body {
    font-size: 0.9em;
    line-height: 1.6;
    max-height: 500px;
    overflow-y: auto;
    padding: 12px 0;
    border-top: 1px solid var(--jf-border);
}
.jf-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.jf-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--jf-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    font-family: var(--jf-font);
    transition: background 0.15s;
}
.jf-btn-primary {
    background: var(--jf-accent);
    color: #fff;
}
.jf-btn-secondary {
    background: transparent;
    border: 1px solid var(--jf-accent);
    color: var(--jf-accent);
}

/* Empty state */
.jf-empty {
    text-align: center;
    padding: 40px 16px;
    opacity: 0.5;
    font-size: 0.9em;
}

/* Spinner */
.jf-spinner {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
}
.jf-spinner-ring {
    width: 36px; height: 36px;
    border: 3px solid var(--jf-border);
    border-top-color: var(--jf-accent);
    border-radius: 50%;
    animation: jf-spin 0.8s linear infinite;
}
@keyframes jf-spin {
    to { transform: rotate(360deg); }
}

/* Scroll sentinel */
.jf-scroll-sentinel {
    display: flex;
    justify-content: center;
    padding: 12px;
}

/* Footer */
.jf-footer {
    text-align: center;
    padding: 24px;
    font-size: 0.8em;
    opacity: 0.4;
}

/* @CST:add:H5V2:mobile_responsive Mobile-responsive rules matching EventSpy */
html, body { overflow-x: hidden; max-width: 100vw; }
.jf-app-layout { max-width: 100vw; overflow-x: hidden; }

@media (max-width: 768px) {
    .jf-banner { padding: 10px 10px 8px; }
    .jf-banner-title { font-size: 1.5em; }
    .jf-banner-tagline { font-size: 0.78em; }
    .jf-app-layout { padding: 0 6px; }
    .jf-main { padding: 6px 4px; }

    .jf-toolbar {
        flex-wrap: wrap; gap: 6px; padding: 6px 0;
    }
    .jf-toolbar-left { gap: 6px; }
    .jf-toolbar-right {
        flex-wrap: wrap; gap: 4px; width: 100%;
        overflow-x: auto; -webkit-overflow-scrolling: touch;
        scrollbar-width: none; padding-bottom: 2px;
    }
    .jf-toolbar-right::-webkit-scrollbar { display: none; }
    .jf-tb-btn { font-size: 1.6em !important; }

    .jf-region-toggle {
        font-size: 0.78em; padding: 5px 8px;
        min-height: 36px; display: inline-flex; align-items: center;
    }
    .jf-region-menu {
        position: fixed; left: 6px; right: 6px;
        top: 160px; bottom: auto;
        max-height: 50vh; width: auto; z-index: 1000;
        border-radius: 8px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    }
    .jf-salary-panel {
        top: 160px;
    }

    /* Row 1: Icons + Sort merged */
    .jf-toolbar {
        flex-wrap: nowrap; justify-content: space-between;
    }
    .jf-toolbar-left { gap: 4px; }

    /* Row 3: Search + Category on same line */
    .jf-filter-row { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .jf-filter-row::-webkit-scrollbar { display: none; }
    .jf-search-row {
        flex-direction: row; flex-wrap: nowrap; gap: 4px; padding: 4px 0;
        align-items: center;
    }
    .jf-search-group { flex: 1; min-width: 0; width: auto; }
    .jf-search-group input {
        font-size: 16px !important; height: 36px; width: 100%;
        max-width: none; padding: 6px 34px 6px 10px;
    }
    .jf-search-icon { font-size: 1.2em; right: 8px; }
    .jf-filter-group { flex-shrink: 0; }
    .jf-filter-btn {
        font-size: 0.72em; padding: 4px 8px; min-height: 36px;
        white-space: nowrap;
    }
    /* Sort: stays in toolbar-right via CSS order */
    .jf-sort-select {
        font-size: 0.78em; height: 32px; min-width: 100px;
    }

    .jf-panel { padding: 8px; margin-bottom: 6px; }
    .jf-cat-chips { gap: 4px; }
    .jf-cat-chip {
        font-size: 0.72em; padding: 4px 8px;
    }

    .jf-list-header { padding: 6px 10px; gap: 8px; }
    .jf-job-list { max-height: calc(100vh - 180px); }
    .jf-list-header h2 { font-size: 0.95em; }
    .jf-list-count { font-size: 0.75em; }

    .jf-job-row { padding: 8px 4px; gap: 8px; }
    .jf-job-thumb, .jf-thumb-placeholder {
        width: 40px; height: 40px; border-radius: 6px;
    }
    .jf-job-title { font-size: 0.88em; }
    .jf-job-employer { font-size: 0.75em; }
    .jf-job-meta { font-size: 0.72em; gap: 8px; }
    .jf-job-badges { gap: 3px; }
    .jf-badge { font-size: 0.68em; padding: 1px 5px; }
    .jf-row-actions { gap: 8px; }
    .jf-row-btn { font-size: 1.2em; padding: 4px; }

    .jf-footer { font-size: 0.7em; padding: 12px; }
    .jf-spinner-ring { width: 28px; height: 28px; }
}

@media (max-width: 480px) {
    .jf-banner-title { font-size: 1.4em; }
    .jf-toolbar-right { gap: 3px; }
    .jf-region-toggle { font-size: 0.72em; padding: 4px 6px; }
    .jf-job-thumb, .jf-thumb-placeholder { width: 36px; height: 36px; }
    .jf-job-title { font-size: 0.84em; }
    .jf-badge { font-size: 0.64em; padding: 1px 4px; }
}

/* Salary filter mobile */
@media (max-width: 768px) {
    #jfSalaryMin, #jfSalaryMax {
        width: 70px !important; height: 36px; font-size: 16px !important;
    }
}

/* Category dropdown items */
.jf-cat-item {
    display: flex !important; align-items: center; gap: 6px;
    white-space: nowrap;
}
.jf-cat-item input[type="checkbox"] {
    accent-color: var(--jf-accent); width: 14px; height: 14px; flex-shrink: 0; cursor: pointer;
}
.jf-category-menu {
    overflow-y: auto;
}

/* Job type badges */
.jf-badge-fulltime { background: rgba(33,150,243,0.15); color: #42a5f5; }
.jf-badge-contract { background: rgba(255,152,0,0.15); color: #ffa726; }
.jf-badge-parttime { background: rgba(171,71,188,0.15); color: #ba68c8; }
.jf-badge-casual { background: rgba(255,183,77,0.15); color: #ffb74d; }
/* Work arrangement badges */
.jf-badge-remote { background: rgba(0,230,118,0.15); color: #66bb6a; }
.jf-badge-hybrid { background: rgba(0,188,212,0.15); color: #26c6da; }
.jf-badge-onsite { background: rgba(158,158,158,0.12); color: #9e9e9e; }

/* @CST:add:H6X1:banner_font Bodoni Moda serif title matching EventSpy */
.jf-banner-title {
    font-family: 'Bodoni Moda', serif;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* @CST:add:H6Y2:mobile_dropdown_fix Mobile dropdown solid overlay */
@media (max-width: 768px) {
    .jf-region-menu {
        position: fixed !important;
        top: 160px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        max-height: 60vh !important;
        z-index: 10000 !important;
        background: var(--jf-bg) !important;
        border: 1px solid var(--jf-border) !important;
        box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
        border-radius: var(--jf-radius) !important;
    }
    .jf-category-menu {
        top: 140px !important;
    }
}
