/* ============================================================
   Career Jobs Board  –  Frontend Styles
   Matches the Dassault Systèmes style shown in the screenshot
   ============================================================ */

/* -- Reset & base ------------------------------------------ */
.cjb-wrapper,
.cjb-wrapper * {
    box-sizing: border-box;
}
.cjb-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    color: #333;
}

/* -- Buttons ----------------------------------------------- */
.cjb-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1564be;
    color: #fff;
    border: 2px solid #1564be;
    padding: 11px 30px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background .2s, border-color .2s;
    line-height: 1;
}
.cjb-btn-primary:hover { background: #1254a0; border-color: #1254a0; color: #fff; }

.cjb-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1564be;
    border: 2px solid #1564be;
    padding: 11px 30px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background .2s;
    line-height: 1;
}
.cjb-btn-outline:hover { background: #eef4ff; color: #1564be; }

/* -- Search Bar -------------------------------------------- */
.cjb-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.cjb-search-input-wrap {
    position: relative;
    flex: 1;
}
.cjb-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #aaa;
    pointer-events: none;
}
.cjb-keyword-input {
    width: 100%;
    padding: 13px 16px 13px 46px;
    border: 1px solid #d0d5dd;
    border-radius: 50px;
    font-size: 15px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color .2s, box-shadow .2s;
}
.cjb-keyword-input:focus {
    border-color: #1564be;
    box-shadow: 0 0 0 3px rgba(21,100,190,.12);
}
.cjb-keyword-input::placeholder { color: #aaa; }

/* -- Filters ----------------------------------------------- */
.cjb-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.cjb-filter-dropdown {
    position: relative;
    flex: 1;
    min-width: 170px;
}
.cjb-filter-select {
    width: 100%;
    padding: 11px 36px 11px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    color: #333;
    transition: border-color .2s;
}
.cjb-filter-select:focus { border-color: #1564be; }
.cjb-dropdown-arrow {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #777;
    font-size: 11px;
}

/* -- Results count ----------------------------------------- */
.cjb-results-count {
    font-size: 15px;
    color: #333;
    margin-bottom: 14px;
}

/* -- Main split layout ------------------------------------- */
.cjb-main {
    display: flex;
    border: 1px solid #e0e4ea;
    border-radius: 8px;
    overflow: hidden;
    min-height: 520px;
    background: #fff;
}

/* -- Job List (left) --------------------------------------- */
.cjb-job-list {
    width: 370px;
    min-width: 370px;
    border-right: 1px solid #e0e4ea;
    overflow-y: auto;
    max-height: 620px;
}

/* Loading / empty states */
.cjb-loading,
.cjb-no-results {
    padding: 50px 24px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
}

/* Job card */
.cjb-job-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid #f2f4f7;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: background .12s;
}
.cjb-job-card:last-child { border-bottom: none; }
.cjb-job-card:hover  { background: #f5f9ff; }
.cjb-job-card.active { background: #eef4ff; border-left-color: #1564be; }

/* Company logo in card */
.cjb-job-logo {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 8px;
    background: #1a2a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.5px;
    flex-shrink: 0;
}
.cjb-job-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Card text */
.cjb-job-info { flex: 1; min-width: 0; }

.cjb-card-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #888;
    margin-bottom: 4px;
}
.cjb-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1564be;
    line-height: 1.4;
    margin-bottom: 8px;
}
.cjb-card-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cjb-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
}
.cjb-meta-item svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: #999;
}

/* -- Job Detail (right) ------------------------------------ */
.cjb-job-detail {
    flex: 1;
    padding: 30px 32px;
    overflow-y: auto;
    max-height: 620px;
    background: #fff;
}

/* Placeholder when no job selected */
.cjb-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: #ccc;
    gap: 14px;
}
.cjb-placeholder-icon { width: 52px; height: 52px; }
.cjb-detail-placeholder p { font-size: 15px; margin: 0; }

/* Detail header */
.cjb-detail-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #777;
    margin-bottom: 10px;
}
.cjb-detail-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin: 0 0 18px;
}
.cjb-detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef0f4;
}
.cjb-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
}
.cjb-detail-meta-item svg { width: 15px; height: 15px; color: #999; }

/* Apply & share buttons */
.cjb-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    align-items: center;
}
.cjb-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #1564be;
    border: 2px solid #1564be;
    padding: 11px 22px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    text-decoration: none;
}
.cjb-share-btn:hover { background: #eef4ff; }
.cjb-share-btn svg { flex-shrink: 0; }

/* Job content */
.cjb-detail-content {
    font-size: 15px;
    line-height: 1.75;
    color: #444;
}
.cjb-detail-content h1, .cjb-detail-content h2, .cjb-detail-content h3 {
    color: #1a1a2e;
    margin-top: 24px;
}
.cjb-detail-content ul, .cjb-detail-content ol { padding-left: 22px; }
.cjb-detail-content li { margin-bottom: 6px; }
.cjb-detail-content p { margin-bottom: 14px; }

/* -- Pagination -------------------------------------------- */
.cjb-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    gap: 12px;
    flex-wrap: wrap;
}
.cjb-page-info {
    font-size: 13px;
    color: #666;
}
.cjb-pages {
    display: flex;
    align-items: center;
    gap: 3px;
}
.cjb-page-btn {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #444;
    padding: 0 6px;
    transition: background .15s;
}
.cjb-page-btn:hover:not(:disabled) { background: #f0f2f5; }
.cjb-page-btn.active { background: #1564be; color: #fff; }
.cjb-page-btn:disabled { opacity: .35; cursor: not-allowed; }

/* -- Apply Modal ------------------------------------------- */
.cjb-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.cjb-modal-overlay.open { display: flex; }

.cjb-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .2);
}
.cjb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.cjb-modal-header h2 {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}
.cjb-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #aaa;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    transition: color .2s;
}
.cjb-modal-close:hover { color: #333; }

/* Form inside modal */
#cjb-apply-form { padding: 20px 28px 28px; }

.cjb-form-row {
    display: flex;
    gap: 14px;
}
.cjb-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    flex: 1;
}
.cjb-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.cjb-required { color: #e53e3e; }

.cjb-form-group input[type="text"],
.cjb-form-group input[type="email"],
.cjb-form-group input[type="tel"],
.cjb-form-group textarea {
    padding: 10px 13px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    color: #333;
    transition: border-color .2s, box-shadow .2s;
    resize: vertical;
}
.cjb-form-group input:focus,
.cjb-form-group textarea:focus {
    border-color: #1564be;
    box-shadow: 0 0 0 3px rgba(21,100,190,.1);
}
.cjb-form-group input::placeholder,
.cjb-form-group textarea::placeholder { color: #bbb; }

/* File upload */
.cjb-file-input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0; overflow: hidden;
}
.cjb-file-upload-wrap { position: relative; }
.cjb-file-label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border: 2px dashed #d0d5dd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: border-color .2s, color .2s;
}
.cjb-file-label:hover { border-color: #1564be; color: #1564be; }

/* Form actions */
.cjb-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}
.cjb-submit-btn { flex: 1; padding: 13px 20px; font-size: 15px; }

/* Form message */
.cjb-form-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 7px;
    font-size: 14px;
    display: none;
    line-height: 1.5;
}
.cjb-form-message.success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
    display: block;
}
.cjb-form-message.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
    display: block;
}

/* Toast notification */
.cjb-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: #fff;
    padding: 11px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 9999999;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    white-space: nowrap;
}

/* -- Responsive -------------------------------------------- */
@media (max-width: 780px) {
    .cjb-search-bar { flex-wrap: wrap; }
    .cjb-search-input-wrap { width: 100%; flex: none; }

    .cjb-main { flex-direction: column; }
    .cjb-job-list {
        width: 100%;
        min-width: 0;
        max-height: 340px;
        border-right: none;
        border-bottom: 1px solid #e0e4ea;
    }
    .cjb-job-detail { max-height: none; padding: 20px; }

    .cjb-form-row { flex-direction: column; gap: 0; }
    .cjb-filters { flex-direction: column; }
    .cjb-detail-title { font-size: 20px; }
    .cjb-pagination-wrap { justify-content: center; }
}

.iti {
    width: 100%;
}

.iti__flag-container {
    display: block !important;
}

.iti__selected-flag {
    display: flex !important;
    align-items: center;
}
