/* ════════════════════════════════════════════════════════════
   ATS Job Board Manager – Frontend Styles
   ════════════════════════════════════════════════════════════ */

.atsjb-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
}

/* ─── Page Title ────────────────────────────────────────────── */
.atsjb-page-title {
    font-size: 2em;
    margin: 0 0 24px;
    font-weight: 700;
}

/* ─── Filter Bar ────────────────────────────────────────────── */
.atsjb-filters {
    background: #f7f9fc;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.atsjb-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.atsjb-filter-field {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
}

.atsjb-filter-field label {
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
}

.atsjb-filter-field input,
.atsjb-filter-field select {
    padding: 8px 10px;
    border: 1px solid #ccd0d7;
    border-radius: 4px;
    font-size: 0.95em;
    background: #fff;
}

.atsjb-filter-submit {
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
}

.atsjb-filter-field select:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.atsjb-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
    white-space: nowrap;
}

.atsjb-btn:hover,
.atsjb-btn:focus {
    background: #005a87;
    color: #fff !important;
}

.atsjb-btn-secondary {
    background: #f1f1f1;
    color: #333 !important;
    border: 1px solid #ccc;
}

.atsjb-btn-secondary:hover {
    background: #e1e1e1;
    color: #333 !important;
}

.atsjb-btn-lg {
    padding: 14px 32px;
    font-size: 1.1em;
}

/* ─── Results Count ─────────────────────────────────────────── */
.atsjb-results-count {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 16px;
}

/* ─── Job Card List ─────────────────────────────────────────── */
.atsjb-job-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.atsjb-job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: #fff;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    padding: 20px 24px;
    transition: box-shadow 0.2s;
}

.atsjb-job-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.atsjb-job-card-body {
    flex: 1 1 0;
}

.atsjb-job-title {
    font-size: 1.2em;
    margin: 0 0 6px;
    font-weight: 600;
}

.atsjb-job-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.atsjb-job-title a:hover {
    color: #0073aa;
}

/* ─── Meta Tags ─────────────────────────────────────────────── */
.atsjb-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
}

.atsjb-meta-item {
    font-size: 0.88em;
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.atsjb-meta-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #0073aa;
}

.atsjb-meta-item.atsjb-salary {
    color: #1e7e34;
    font-weight: 600;
}

.atsjb-meta-item.atsjb-salary .dashicons {
    color: #1e7e34;
}

/* ─── Description Excerpt ───────────────────────────────────── */
.atsjb-job-excerpt {
    font-size: 0.92em;
    color: #555;
    margin: 10px 0 0;
    line-height: 1.5;
}

/* ─── Card Actions ──────────────────────────────────────────── */
.atsjb-job-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ─── Pagination ────────────────────────────────────────────── */
.atsjb-pagination {
    margin-top: 30px;
    text-align: center;
}

.atsjb-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.atsjb-pagination .page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ─── No Results ────────────────────────────────────────────── */
.atsjb-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* ════════════════════════════════════════════════════════════
   Single Job
   ════════════════════════════════════════════════════════════ */
.atsjb-single .atsjb-back-link {
    margin-bottom: 20px;
}

.atsjb-single .atsjb-back-link a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.atsjb-single .atsjb-job-header {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e1e5eb;
}

.atsjb-single .atsjb-job-title {
    font-size: 1.8em;
    margin: 0 0 12px;
}

.atsjb-apply-header,
.atsjb-apply-footer {
    margin-top: 20px;
}

.atsjb-apply-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e1e5eb;
    text-align: center;
}

.atsjb-job-content {
    line-height: 1.7;
}

.atsjb-job-content ol,
.atsjb-job-content ul {
    margin-left: 24px;
}

/* ─── Additional Details ────────────────────────────────────── */
.atsjb-job-sidebar-info {
    margin-top: 32px;
    padding: 20px 24px;
    background: #f7f9fc;
    border-radius: 8px;
}

.atsjb-job-sidebar-info h3 {
    margin: 0 0 12px;
    font-size: 1.1em;
}

.atsjb-details-table {
    width: 100%;
    border-collapse: collapse;
}

.atsjb-details-table th,
.atsjb-details-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5eb;
}

.atsjb-details-table th {
    width: 140px;
    font-weight: 600;
    color: #444;
}

/* ─── Filter Toggle Button (hidden on desktop) ─────────────── */
.atsjb-filter-toggle {
    display: none !important; /* hidden on desktop */
    visibility: hidden;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Show filter toggle button on mobile */
    .atsjb-filter-toggle {
        display: flex !important;
        visibility: visible !important;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 12px 16px;
        margin-bottom: 0;
        background: #0073aa;
        color: #fff !important;
        border: none;
        border-radius: 8px;
        font-size: 1em;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: rgba(0, 115, 170, 0.3);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        position: relative;
        z-index: 10;
    }
    .atsjb-filter-toggle:hover,
    .atsjb-filter-toggle:focus,
    .atsjb-filter-toggle:active {
        background: #005a87;
        outline: none;
        color: #fff !important;
    }
    .atsjb-filter-toggle .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
    .atsjb-filter-toggle .atsjb-toggle-icon {
        margin-left: auto;
        transition: transform 0.3s ease;
        display: inline-block;
    }
    .atsjb-filter-toggle[aria-expanded="true"] .atsjb-toggle-icon {
        transform: rotate(180deg);
    }
    .atsjb-filter-toggle[aria-expanded="true"] {
        border-radius: 8px 8px 0 0;
        margin-bottom: 0;
    }

    /* Collapsible filters on mobile – collapsed by default */
    .atsjb-filters {
        max-height: 0 !important;
        overflow: hidden !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        border-top: none;
        border-radius: 0 0 8px 8px;
        transition: max-height 0.35s ease, padding 0.35s ease, margin-bottom 0.35s ease;
        opacity: 1;
        visibility: visible;
    }

    /* Expanded state – overrides the collapsed defaults */
    .atsjb-filters.atsjb-filters-open {
        max-height: 2000px !important;
        overflow: visible !important;
        padding: 20px 24px !important;
        margin-bottom: 24px !important;
    }

    .atsjb-filter-row {
        flex-direction: column;
    }
    .atsjb-job-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .atsjb-job-card-actions {
        width: 100%;
    }
    .atsjb-job-card-actions .atsjb-btn {
        flex: 1;
    }
}
