/**
 * Custom Job Listings Frontend Styles
 */

/* General styles */
.cjl-highlight-item {
    width: 25%;
    font-size: 16px;
}

.cjl-highlight-item span.cjl-highlight-label, .cjl-highlight-item .cjl-highlight-value {
    width:100%;
    display: block;
}

.cjl-highlight-item span.cjl-highlight-label {
    margin-bottom: 10px;
}

.cjl-form-row.cjl-privacy-field label {
    font-size: 14px;
    font-weight: 500;
}

span.cjl-highlight-value {
    font-size: 14px;
}

.cjl-job-listings {
    margin-bottom: 30px;
    max-width: 1200px !important;
}

.cjl-job-highlights-box {
    background-color:#004274 !important;
    color:#fff;
}

.cjl-button, .cjl-sort-button {
    display: inline-block;
    background-color: #0073aa;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    transition: background-color 0.3s;
}

.cjl-job-card {
    margin-bottom: 30px;
}

.cjl-button:hover,
.cjl-button:focus {
    background-color: #005b88;
    color: #fff;
    text-decoration: none;
}

.cjl-button-secondary {
    background-color: #f7f7f7;
    color: #555;
    border: 1px solid #ccc;
}

.cjl-button-secondary:hover,
.cjl-button-secondary:focus {
    background-color: #e7e7e7;
    color: #555;
}

/* Filter form styles */
.cjl-filter-row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.cjl-filter-field {
    flex: 1 0 200px;
    padding: 10px;
}

.cjl-filter-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.cjl-filter-field input,
.cjl-filter-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cjl-filter-submit {
    align-self: flex-end;
}

/* Job listing styles */
.cjl-jobs-count {
    margin-bottom: 20px;
    font-size: 16px;
    display: inline-block;
    width: 49% !important;
    box-sizing: border-box;
}

.cjl-jobs-sorting {
    display: inline-block;
    text-align: right;
    justify-content: right;
    width: 50%;
    box-sizing: border-box;
}

.cjl-sort-select, .cjl-sort-order {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

.cjl-job-item {
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    background-color: #fff;
    transition: box-shadow 0.3s;
}

.cjl-job-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cjl-job-header {
    margin-bottom: 15px;
}

.cjl-job-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.cjl-job-title a {
    color: #0073aa;
    text-decoration: none;
}

.cjl-job-title a:hover {
    text-decoration: underline;
}

.cjl-job-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cjl-job-category {
    background-color: #f0f0f0;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
}

.cjl-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.cjl-job-meta span {
    font-weight: 600;
    color: #333;
}

.cjl-job-excerpt {
    margin-bottom: 15px;
    color: #555;
}

.cjl-job-footer {
    display: flex;
    justify-content: flex-end;
}

/* Pagination styles */
.cjl-pagination {
    margin-top: 30px;
    text-align: center;
}

.cjl-pagination .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px;
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
    list-style: none;
}

ul.page-numbers {
    width:100%;
    background: transparent !important;
    border: 0 !important;
}

ul.page-numbers li {
    display: inline-block;
}

.cjl-pagination .page-numbers.current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.cjl-pagination .page-numbers:hover {
    background-color: #e9e9e9;
}

.cjl-pagination .page-numbers.current:hover {
    background-color: #0073aa;
}

/* No jobs message */
.cjl-no-jobs {
    background-color: #f7f7f7;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    color: #666;
}

/* Loading animation */
.cjl-loading {
    position: relative;
    min-height: 200px;
}

.cjl-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
}

.cjl-loader span {
    position: relative;
    padding-left: 30px;
    font-weight: 600;
    color: #666;
}

.cjl-loader span:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -10px;
    width: 20px;
    height: 20px;
    border: 2px solid #0073aa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cjl-spinner 0.8s linear infinite;
}

@keyframes cjl-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Application form styles */
.cjl-application-form-container {
    background-color: #fff;
    padding: 25px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.cjl-application-form-container:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cjl-application-form-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cjl-form-row {
    margin-bottom: 20px;
}

.cjl-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.cjl-form-field input,
.cjl-form-field textarea,
.cjl-form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cjl-form-field textarea {
    min-height: 120px;
}

.cjl-form-field .required {
    color: #e74c3c;
}

/* Message styles */
.cjl-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.cjl-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cjl-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Add to your CSS file */
.cjl-job-work-type {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cjl-job-grid-item {
    overflow: hidden;
    height: fit-content;
}

.cjl-job-work-type i {
    margin-right: 5px;
}

.cjl-icon-building:before {
    content: "\f1ad"; /* Font Awesome building icon */
}

.cjl-work-type-badge {
    display: inline-block;
    padding: 3px 6px;
    font-size: 12px;
    border-radius: 3px;
    margin-left: 5px;
}

.cjl-work-type-ondesk {
    background-color: #e3f2fd;
    color: #1565c0;
}

.cjl-work-type-remotely {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.cjl-work-type-hybrid {
    background-color: #fff3e0;
    color: #ef6c00;
}

/* Full width layout styles */
.cjl-fullwidth {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Improved filter form layout */
.cjl-filter-form {
    background-color: #f7f7f7;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    max-width: 1200px !important;
}

.cjl-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.cjl-filter-field {
    flex: 1;
    min-width: 200px;
}

.cjl-filter-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.cjl-filter-field input,
.cjl-filter-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cjl-filter-submit {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

/* Make sure we override theme content width */
.content-area .cjl-fullwidth,
.site-content .cjl-fullwidth,
.entry-content .cjl-fullwidth {
    max-width: 100%;
    width: 100%;
    padding: 0;
}

/* Open Positions Table Styles */
.cjl-open-positions {
    margin: 30px 0;
}

.cjl-open-positions h2 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.cjl-jobs-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 20px;
}

.cjl-jobs-table th,
.cjl-jobs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.cjl-jobs-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.cjl-jobs-table tr:hover {
    background-color: #f9f9f9;
}

.cjl-jobs-table .job-title {
    width: 35%;
}

.cjl-jobs-table .job-location {
    width: 25%;
}

.cjl-jobs-table .job-department {
    width: 25%;
}

.cjl-jobs-table .job-date {
    width: 15%;
}

.cjl-jobs-table a.sort-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cjl-jobs-table a.sort-link:hover {
    color: #0073aa;
}

.cjl-jobs-table .job-title a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.cjl-jobs-table .job-title a:hover {
    text-decoration: underline;
}

.cjl-open-positions {
    max-width: 1200px !important;
}

/**
 * File Upload Field Styling
 * 
 * Add this to your CSS file or include it inline in your form template
 */

/* File input styling */
.cjl-form-field input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.cjl-form-field .cjl-file-input-label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 2px dashed #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.cjl-form-field .cjl-file-input-label:hover,
.cjl-form-field .cjl-file-input-label:focus {
    background-color: #e9ecef;
    border-color: #2e74b5;
}

.cjl-form-field .cjl-file-input-label .cjl-file-icon {
    margin-right: 10px;
    color: #2e74b5;
}

.cjl-form-field .cjl-file-input-label .cjl-file-button {
    display: inline-block;
    background-color: #2e74b5;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.cjl-form-field .cjl-file-input-label:hover .cjl-file-button {
    background-color: #245a8c;
}

.cjl-form-field .cjl-file-input-label .cjl-file-text {
    color: #6c757d;
}

/* File name display */
.cjl-file-name-display {
    margin-top: 10px;
    padding: 10px;
    background-color: #f1f8ff;
    border: 1px solid #c8e1ff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px; /* Space for icon */
}

.cjl-file-name-display::before {
    content: '';
    position: absolute;
    left: 10px;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.cjl-file-icon-pdf::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23e74c3c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3C/line%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3C/line%3E%3Cpolyline points='10 9 9 9 8 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.cjl-file-icon-doc::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232e74b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3Cline x1='16' y1='13' x2='8' y2='13'%3E%3C/line%3E%3Cline x1='16' y1='17' x2='8' y2='17'%3E%3C/line%3E%3Cline x1='10' y1='9' x2='8' y2='9'%3E%3C/line%3E%3C/svg%3E");
}

.cjl-file-icon-default::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'%3E%3C/path%3E%3Cpolyline points='14 2 14 8 20 8'%3E%3C/polyline%3E%3C/svg%3E");
}

.cjl-file-name {
    font-weight: 500;
    word-break: break-all;
}

.cjl-file-size {
    color: #6c757d;
    margin-left: 5px;
    white-space: nowrap;
}

/* Error state for file input */
.cjl-form-field.has-error .cjl-file-input-label {
    border-color: #e74c3c;
    background-color: #fff8f8;
}

/* Loading state for file upload */
.cjl-file-uploading {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.cjl-file-uploading .cjl-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(46, 116, 181, 0.3);
    border-top-color: #2e74b5;
    border-radius: 50%;
    animation: cjl-spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes cjl-spin {
    to { transform: rotate(360deg); }
}

/* Responsive styles */

@media (max-width: 576px) {
    .cjl-jobs-table .job-department {
        display: none;
    }
    
    .cjl-jobs-table .job-title {
        width: 50%;
    }
    
    .cjl-jobs-table .job-location {
        width: 50%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cjl-filter-field {
        flex: 1 0 100%;
    }

    .cjl-filter-field {
        flex: 1 0 100%;
    }
    
    .cjl-job-meta {
        flex-direction: column;
        gap: 8px;
    }

    .cjl-jobs-table th,
    .cjl-jobs-table td {
        padding: 8px 10px;
    }
    
    .cjl-jobs-table .job-date {
        display: none;
    }
}