/* ==========================================================================
   1. Front-End Job Submission Form (#cjb-job-submission-form)
   ========================================================================== */

#cjb-job-submission-form {
    max-width: 780px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 8px;
    box-sizing: border-box;
}

#cjb-job-submission-form .acf-fields > .acf-field {
    padding: 1rem 0 !important;
    border-top: none;
}

#cjb-job-submission-form .acf-label label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    display: block;
}

#cjb-job-submission-form .acf-label .description {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 0.2rem;
}

#cjb-job-submission-form .acf-required {
    color: #d63638;
}

/* Inputs (Inherits theme typography & adapts border to text color) */
#cjb-job-submission-form input[type="text"],
#cjb-job-submission-form input[type="email"],
#cjb-job-submission-form input[type="url"],
#cjb-job-submission-form select,
#cjb-job-submission-form textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    color: inherit;
    background-color: transparent;
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#cjb-job-submission-form input:focus,
#cjb-job-submission-form select:focus,
#cjb-job-submission-form textarea:focus {
    outline: none;
    border-color: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

/* WYSIWYG Editor Wrapper */
#cjb-job-submission-form .wp-editor-wrap {
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
    border-radius: 6px;
    overflow: hidden;
}

/* Submit Section */
#cjb-job-submission-form .acf-form-submit {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

/* Success & Validation Notices */
.cjb-notice-success,
#cjb-job-submission-form #message.updated {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    background-color: #edfaef;
    border-left: 4px solid #00a32a;
    color: #1d2327;
    border-radius: 4px;
    font-weight: 500;
}

#cjb-job-submission-form .acf-notice.-error {
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Responsive Stacking for 50% Width Fields */
@media (max-width: 640px) {
    #cjb-job-submission-form {
        padding: 1.25rem;
    }

    #cjb-job-submission-form .acf-fields > .acf-field[style*="width"] {
        width: 100% !important;
        float: none !important;
        clear: both !important;
    }
}

/* ==========================================================================
   2. Job Listing Archive Grid Cards & Single Display Fields
   ========================================================================== */

.cjb-job-card {
    height: 100%;
    padding: 1.5rem;
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.cjb-job-card .wp-block-post-title {
    margin-top: 0;
    margin-bottom: 0.85rem;
}

/* Vertical Stacked Metadata inside Grid Cards */
.cjb-job-meta-stack {
    width: 100%;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cjb-job-meta-stack .cjb-field {
    margin-bottom: 0.45rem;
}

/* Pin Read More Link to Bottom-Left of Equal-Height Grid Cards */
.cjb-job-card .cjb-card-link {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 600;
    text-decoration: none;
}

/* Field Labels & Single Template Headings */
.cjb-field {
    margin-bottom: 0.5rem;
}

.cjb-field-label {
    font-weight: 700;
}

.cjb-field-heading {
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.cjb-field-pdf {
    margin-top: 1rem;
}

/* ==========================================================================
   3. Single Job Listing Template
   ========================================================================== */

.cjb-back-link {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.cjb-back-link a {
    text-decoration: none;
    font-weight: 600;
}

.cjb-single-meta-box,
.cjb-single-apply-box {
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-radius: 8px;
    background-color: color-mix(in srgb, currentColor 3%, transparent);
}

.cjb-single-apply-box h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.cjb-single-body {
    margin: 2rem 0;
}

.cjb-single-meta-box .cjb-field-label,
.cjb-single-apply-box .cjb-field-label{
    font-size:1rem;
}
.cjb-single-meta-box .wp-block-post-featured-image{
    max-width:200px;
}
.cjb-field-pdf{
    margin-block-start: 15px !important;
}

/* ==========================================================================
   4. Company Logo in Upper-Right Corner of Archive Cards
   ========================================================================== */

.cjb-card-header {
    width: 100%;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.cjb-card-header .wp-block-post-title {
    margin: 0;
    flex: 1 1 auto;
}

.cjb-company-logo {
    flex: 0 0 auto;
    max-width: 110px;
    max-height: 48px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cjb-company-logo img {
    width: auto;
    height: auto;
    max-width: 110px;
    max-height: 48px;
    object-fit: contain;
}

