/* ============================================================
   PHASE 1: JOB LIST & SIDEBAR STYLES (Unified)
   ============================================================ */

/* --- GLOBAL PAGE RESETS --- */
h1.ow_stdmargin.ow_ic_write::before, .ow_avatar_label { visibility:hidden; }
.ow_page { padding: 0; }
.jcf-unselectable { width: 100%!important; }

/* --- LAYOUT --- */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- SIDEBAR FILTERS (Desktop Sticky) --- */
.filter-sidebar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 0;
    position: sticky;
    top: 80px; /* Adjust based on site header height */
    border: 1px solid #eeeff2;
    margin-bottom: 20px;
    
    /* Scrollbar Logic (Moved from Inline) */
    max-height: 75vh;
    overflow-y: auto; 
    overflow-x: hidden;
    scrollbar-width: thin; 
}

.filter-sidebar::-webkit-scrollbar { width: 6px; }
.filter-sidebar::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 4px; }

.filter-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-header h5 { margin: 0; font-size: 16px; font-weight: 700; color: #121224; }
.filter-header .clear-all { font-size: 12px; text-decoration: none; color: #0b5cff; cursor: pointer; }

.filter-group {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-group:last-child { border-bottom: none; }

.filter-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
    color: #121224;
}

/* --- CUSTOM TWEAKS FOR OXWALL CHECKBOX IN FILTERS --- */
/* Replaces Bootstrap overrides with native Oxwall structure logic */
.ow_checkbox_group { margin-bottom: 4px; border-bottom: none; }
.ow_checkbox_group li { padding-bottom: 2px; }
@media (max-width: 500px) {
    .ow_checkbox_group li { padding-bottom: 8px; }
}
.filter-group .ow_checkbox_group label, 
.offcanvas-body .ow_checkbox_group label, 
.modal-checkbox-grid .ow_checkbox_group label {
    font-weight: 700;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    width: auto;
}

.filter-group .ow_checkbox_group input,
.offcanvas-body .ow_checkbox_group input,
.modal-checkbox-grid .ow_checkbox_group input {
    vertical-align: middle; 
    margin: 0; 
}

.filter-sidebar .count, .offcanvas-body .count, .modal-checkbox-grid .count {
    color: #999;
    font-size: 11px;
    margin-left: auto;
}

/* View More Link */
.view-more-trigger {
    font-size: 12px;
    font-weight: 600;
    color: #0b5cff;
    text-decoration: none;
    cursor: pointer;
    margin-top: 5px;
    display: inline-block;
}
.view-more-trigger:hover { text-decoration: underline; }

/* --- JOB CARD --- */
.ow-job-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-align: left;
}
.ow-job-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: #dbe4ff;
}
.ow-job-card .z-top { position: relative; z-index: 2; }

.ow-job-card .job-title {
    font-size: 17px;
    font-weight: 700;
    text-transform: capitalize;
    color: #121224!important;
    text-decoration: none;
    margin-bottom: 4px;
    display: block;
}
.ow-job-card .job-title:hover { color: #0b5cff; }

.ow-job-card .company-row {
    font-size: 13px;
    color: #474d6a;
    margin-bottom: 12px;
    font-weight: 500;
}
.ow-job-card .cat-link {
    color: #474d6a;
    text-decoration: none;
    font-weight: 500;
}
.ow-job-card .cat-link:hover { color: #0b5cff; }

.ow-job-card .logo-box {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    float: right;
}
.ow-job-card .logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.ow-job-card .meta-row {
    font-size: 13px;
    color: #717b9e;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.ow-job-card .meta-item i {
    font-size: 12px;
    color: #828ba2;
    margin-right: 4px;
}
.ow-job-card .separator { color: #e0e0e0; font-size: 10px; }

.ow-job-card .job-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ow-job-card .tags-row {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ow-job-card .tag-pill {
    font-size: 11px;
    color: #333;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 2px 8px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.2s;
}
.ow-job-card .tag-pill:hover {
    background-color: #e9ecef;
    border-color: #b0b0b0;
    color: #000;
}

.ow-job-card .card-footer-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    padding-top: 8px;
}
.ow-job-card .job-mode {
    background: #f1f5ff;
    color: #0b5cff;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-right: 8px;
}

/* --- HEADER & RESPONSIVE --- */
.results-header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.results-count { font-weight: 700; font-size: 18px; }

/* --- MODAL / OFFCANVAS FIXES --- */
.filter-modal-body { padding: 0; }
.modal-search-box {
    padding: 15px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}
.modal-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* --- BUTTON STYLES --- */
.btn-add-new-job {
    background-color: #0d6efd !important;
    border: 1px solid #0d6efd !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    text-decoration: none !important;
    padding: 6px 24px; /* Fixed padding for consistent shape */
}
.btn-add-new-job:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.25);
}
.btn-add-new-job i { color: #ffffff !important; }

/* --- TAG PAGE SPECIFIC (Modern Card Grid) --- */
.tag-card { transition: all 0.2s ease-in-out; background: #fff; border: 1px solid #e9ecef; }
.tag-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: #bce0fd; }
.tag-link { text-decoration: none; color: #334155; font-weight: 600; font-size: 0.95rem; }
.tag-link:hover { color: #0d6efd; }
.tag-count { background: #f1f5f9; color: #64748b; font-size: 0.8rem; padding: 2px 10px; border-radius: 12px; font-weight: 600; }

.tag-search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
#skillSearch { padding-left: 45px; height: 50px; border-radius: 8px; }

/* ============================================================
   MODERN PAGINATION OVERRIDES
   ============================================================ */
.ow_paging {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.ow_paging span, 
.ow_paging a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 50rem !important; /* Pill Shape */
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.ow_paging a:hover {
    background-color: #0d6efd; 
    color: #ffffff !important; 
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
}

/* Active Page */
.ow_paging span.active {
    background-color: #0d6efd;
    color: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.2);
}
/* Force white text on hover to override default blue theme links */
a.btn-outline-primary:hover {
    color: #ffffff !important;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Widget / Mini Card Modifications */
.ow-job-card-mini {
    padding: 15px !important;
    margin-bottom: 12px !important;
    border-radius: 8px !important;
}
.ow-job-card-mini .job-title {
    font-size: 15px !important; /* Smaller title for sidebar */
    margin-bottom: 2px !important;
    text-transform: capitalize;
}
.ow-job-card-mini .company-row {
    font-size: 12px !important;
    margin-bottom: 8px !important;
}
.ow-job-card-mini .logo-box {
    width: 35px !important;
    height: 35px !important;
    flex: 0 0 35px !important;
    border: none !important;
}
.ow-job-card-mini .meta-row {
    font-size: 11px !important;
    text-transform: capitalize;
    gap: 8px !important;
    margin-bottom: 8px !important;
}
.ow-job-card-mini .tag-pill {
    padding: 1px 6px !important;
    font-size: 10px !important;
}
/* Sidebar Mini Card Polish */
.ow-job-card-mini {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

.ow-job-card-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important;
    border-color: #b0c4de !important;
}

.ow-job-card-mini .badge {
    font-size: 0.7rem;
    padding-bottom: 3px;
}

.ow-job-card-mini img {
    border-radius: 4px;
}

/* Multi-line Title Support */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal !important; /* Overrides text-truncate */
    line-height: 1.3;
}