/**
 * ATS Sync Job Board Styles for Dietitians On Demand
 * Clean, accessible styling matching the site design tokens.
 */

.dod-jobs-wrapper {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}

/* ==========================================================================
   Horizontal Filter Bar
   ========================================================================== */

.dod-filter-bar {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    width: 100%;
}

.dod-filter-form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.dod-filter-item {
    flex: 1 1 23%;
    position: relative;
}

.dod-search-input-wrap {
    position: relative;
    width: 100%;
}

.dod-search-input-wrap input[type="text"] {
    width: 100%;
    height: 44px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 8px 38px 8px 14px;
    font-size: 15px;
    color: #222222;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.dod-search-input-wrap input[type="text"]:focus {
    border-color: #1c75bc;
    box-shadow: 0 0 0 3px rgba(28, 117, 188, 0.15);
}

.dod-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #888888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.dod-search-btn:hover {
    color: #1c75bc;
}

.dod-filter-item select {
    width: 100%;
    height: 44px;
    background: #ffffff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23888888' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 12px center;
    background-size: 14px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 8px 32px 8px 14px;
    font-size: 15px;
    color: #333333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.dod-filter-item select:focus {
    border-color: #1c75bc;
    box-shadow: 0 0 0 3px rgba(28, 117, 188, 0.15);
}

.dod-filter-clear {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.dod-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(207, 69, 32, 0.1);
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.dod-clear-btn:hover {
    background: rgba(207, 69, 32, 0.2);
    transform: scale(1.08);
}

/* ==========================================================================
   Job Listing Cards
   ========================================================================== */

.dod-job-listings {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dod-job-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 1.75rem 0;
    border-bottom: 1px solid rgba(26, 60, 90, 0.22);
    box-sizing: border-box;
}

.dod-job-card:last-child {
    border-bottom: none;
}

.dod-job-primary {
    flex: 1 1 36%;
    min-width: 0;
}

.dod-job-title {
    margin: 0 0 0.35rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.dod-job-title a {
    color: #1a3c5a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dod-job-title a:hover {
    color: #1c75bc;
}

.dod-job-snippet {
    margin: 0;
    font-size: 0.925rem;
    line-height: 1.45;
    color: #555555;
}

.dod-job-meta {
    flex: 1 1 44%;
    display: flex;
    align-items: center;
    gap: 16px;
}

.dod-meta-item {
    flex: 1 1 33.33%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dod-meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888888;
    font-weight: 600;
}

.dod-meta-val {
    font-size: 0.925rem;
    color: #1a3c5a;
    font-weight: 500;
    line-height: 1.25;
}

.dod-job-action {
    flex: 0 0 140px;
    text-align: right;
}

.dod-view-btn {
    display: inline-block;
    padding: 9px 24px !important;
    background-color: #cf4520 !important;
    border: 2px solid #cf4520 !important;
    border-radius: 500px !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-align: center;
    transition: all 0.25s ease !important;
    white-space: nowrap;
}

.dod-view-btn:hover {
    background-color: #9F3619 !important;
    border-color: #9F3619 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(207, 69, 32, 0.3);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.dod-pagination {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dod-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 500px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a3c5a;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.dod-pagination .page-numbers:hover {
    background: #1c75bc;
    color: #ffffff;
    border-color: #1c75bc;
}

.dod-pagination .page-numbers.current {
    background: #1a3c5a;
    color: #ffffff;
    border-color: #1a3c5a;
}

/* ==========================================================================
   No Jobs Found State
   ========================================================================== */

.dod-no-jobs {
    text-align: center;
    padding: 4rem 1rem;
}

.dod-no-jobs h3 {
    color: #1a3c5a;
    margin-bottom: 0.5rem;
}

.dod-no-jobs p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 991px) {
    .dod-filter-form {
        flex-wrap: wrap;
    }

    .dod-filter-item {
        flex: 1 1 calc(50% - 10px);
    }

    .dod-filter-clear {
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .dod-job-card {
        flex-wrap: wrap;
        gap: 16px;
    }

    .dod-job-primary {
        flex: 1 1 100%;
    }

    .dod-job-meta {
        flex: 1 1 70%;
    }

    .dod-job-action {
        flex: 1 1 20%;
    }
}

@media (max-width: 640px) {
    .dod-filter-item {
        flex: 1 1 100%;
    }

    .dod-job-meta {
        flex: 1 1 100%;
        flex-direction: column;
        gap: 8px;
    }

    .dod-meta-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .dod-job-action {
        flex: 1 1 100%;
        text-align: left;
    }

    .dod-view-btn {
        width: 100%;
        display: block;
    }
}

/* ==========================================================================
   Single Job Page (Template B & Layout)
   ========================================================================== */

#dod-single-job-listing {
    padding: 3rem 0;
    width: 100%;
}

#dod-single-job-listing > div > div > .col {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
}

.job-meta-header {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.job-meta-header a.pre {
    color: #1c75bc;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
}

.job-meta-header a.pre:hover {
    color: #cf4520;
}

.job-meta-header .job-posted-date {
    color: #777777;
    font-size: 0.875rem;
}

.job-single-title {
    color: #1a3c5a;
    font-size: 2.25rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* Template B Flex Container */
body.single-ce_job .job_wrapper.template-b {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
}

body.single-ce_job .template-b .job_content {
    flex: 1 1 65%;
    min-width: 0;
    padding-right: 0;
    margin-top: 0;
}

body.single-ce_job .template-b .job_application_sidebar {
    flex: 0 0 360px;
    max-width: 380px;
    width: 100%;
    padding: 24px;
    background-color: #f7f5f2;
    border: 1px solid #e5e0d8;
    border-radius: 8px;
    box-sizing: border-box;
}

body.single-ce_job .template-b .job_application_sidebar h3 {
    font-size: 1.4rem;
    color: #1a3c5a;
    margin-bottom: 0.75rem;
}

body.single-ce_job .template-b .job_application_sidebar .ce_apply fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.single-ce_job .template-b .job_application_sidebar .ce_apply input[type="text"],
body.single-ce_job .template-b .job_application_sidebar .ce_apply input[type="email"],
body.single-ce_job .template-b .job_application_sidebar .ce_apply input[type="tel"],
body.single-ce_job .template-b .job_application_sidebar .ce_apply select {
    width: 100% !important;
    box-sizing: border-box;
    height: 42px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 6px 12px;
    margin-bottom: 12px;
    background: #ffffff;
    font-size: 14px;
}

body.single-ce_job .template-b .job_application_sidebar .ce_apply input[type="submit"] {
    background-color: #cf4520 !important;
    border: 2px solid #cf4520 !important;
    border-radius: 500px !important;
    color: #ffffff !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
}

body.single-ce_job .template-b .job_application_sidebar .ce_apply input[type="submit"]:hover {
    background-color: #9F3619 !important;
    border-color: #9F3619 !important;
}

/* Attributes bar inside job_content */
body.single-ce_job .template-b .job_attributes_wide {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #d9d9d9;
}

@media (max-width: 991px) {
    body.single-ce_job .job_wrapper.template-b {
        flex-direction: column;
        gap: 32px;
    }

    body.single-ce_job .template-b .job_content {
        flex: 1 1 100%;
        width: 100%;
    }

    body.single-ce_job .template-b .job_application_sidebar {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }
}
