/* =========================================================
   Job Board Plugin — Frontend Styles
   ========================================================= */

/* Layout */
.jbp-listings-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Search bar */
.jbp-search-bar {
    margin-bottom: 1.5rem;
}

.jbp-search-bar__inner {
    position: relative;
    display: flex;
    align-items: center;
}

.jbp-search-bar__icon {
    position: absolute;
    right: 1.85rem;
    color: #a0aec0;
    pointer-events: none;
    flex-shrink: 0;
}

.jbp-search-bar__input {
    width: 100%;
    padding: .7rem 2.8rem .7rem 2.5rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: .97rem;
    color: #2d3748;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .18s, box-shadow .18s;
    -webkit-appearance: none;
    appearance: none;
}

.jbp-search-bar__input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}

.jbp-search-bar__input::-webkit-search-cancel-button {
    display: none;
}

.jbp-search-bar__clear {
    position: absolute;
    right: .7rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    padding: .25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.jbp-search-bar__clear:hover {
    color: #4a5568;
}

.jbp-search-bar__count {
    margin: .45rem 0 0;
    font-size: .83rem;
    color: #718096;
    min-height: 1.2em;
}

.jbp-no-results {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 2rem 0;
}

.jbp-job-listings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-family: inherit;
}

.jbp-no-jobs {
    color: #666;
    font-style: italic;
}

/* Job Card */
.jbp-job-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}

.jbp-job-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.jbp-job-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .75rem;
}

.jbp-job-card__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #00529f !important;
}

.jbp-job-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .82rem;
    color: #718096;
}

.jbp-meta-location,
.jbp-meta-salary {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.jbp-meta-location svg,
.jbp-meta-salary svg {
    flex-shrink: 0;
    color: #a0aec0;
}

.jbp-job-card__excerpt p {
    margin: 0 0 1rem;
    color: #4a5568;
    line-height: 1.6;
    font-size: .95rem;
}

.jbp-job-card__actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

/* Buttons */
.jbp-apply-btn,
.jbp-submit-btn,
.jbp-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.3rem;
    border-radius: 6px;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .18s, transform .1s;
}

.jbp-apply-btn {
    background: #507A7C;
    color: #fff;
}

.jbp-apply-btn:hover,
.jbp-apply-btn:focus-visible {
    background: #3d5f61;
}

.jbp-apply-btn[aria-expanded="true"] {
    background: #2e4849;
}

.jbp-submit-btn {
    background:#00529f !important;
    color: #fff;
}

.jbp-submit-btn:hover:not(:disabled) {
    background: #00529f !important;
}

.jbp-submit-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.jbp-cancel-btn {
    background: transparent;
    color: #718096;
    border: 1px solid #cbd5e0;
}

.jbp-cancel-btn:hover {
    background: #f7fafc;
}

/* Spinner */
.jbp-btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: jbp-spin .7s linear infinite;
}

@keyframes jbp-spin {
    to { transform: rotate(360deg); }
}

/* Application Form */
.jbp-application-form {
    margin-top: 1.25rem;
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    animation: jbp-slide-down .22s ease;
}

@keyframes jbp-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.jbp-application-form h4 {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
}

/* Form Layout */
.jbp-form__row {
    margin-bottom: 0;
}

.jbp-form__row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .jbp-form__row--half {
        grid-template-columns: 1fr;
    }
}

.jbp-form__group {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.jbp-form__group label {
    font-size: .87rem;
    font-weight: 600;
    color: #374151;
}

.jbp-form__group label span[aria-hidden] {
    color: #e53e3e;
    margin-left: 2px;
}

.jbp-file-hint {
    font-weight: 400;
    color: #718096;
    margin-left: .25rem;
}

.jbp-form input[type="text"],
.jbp-form input[type="email"] {
    width: 100%;
    padding: .55rem .75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: .93rem;
    color: #2d3748;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    box-sizing: border-box;
	margin-bottom:8px;
}

.jbp-form input[type="text"]:focus,
.jbp-form input[type="email"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.2);
}

.jbp-form input[type="file"] {
    font-size: .9rem;
    color: #4a5568;
    padding: .3rem 0;
}

/* Form Response Messages */
.jbp-form__response {
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
    display: none;
}

.jbp-form__response.is-success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.jbp-form__response.is-error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Form Actions */
.jbp-form__actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* See Full Detail button */
.jbp-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1.3rem;
    background: #00529f !important;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s;
}

.jbp-detail-btn:hover {
    background: #ffff;
	color:#00529f;
}

/* Inline detail panel — expands inside the job card */
.jbp-modal-overlay {
    display: block;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

/* Panel container */
.jbp-modal {
    position: relative;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 100%;
    padding: 1.5rem;
}

/* Close button */
.jbp-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #00529f !important;
    border: none;
    cursor: pointer;
    color: #ffff;
    padding: .35rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color .15s, background .15s;
}

.jbp-modal__close:hover {
    color: #00529f;
    background: #ffff;
}

/* Modal header */
.jbp-modal__header {
    padding-right: 2.5rem;
    margin-bottom: 1.25rem;
}

.jbp-modal__title {
    margin: 0 0 .6rem;
    font-size: 1.4rem;
    font-weight: 700;
    color:#00529f !important;
    line-height: 1.3;
}

.jbp-modal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .85rem;
    color: #718096;
}

/* Modal body */
.jbp-modal__description {
    color: #4a5568;
    line-height: 1.75;
    font-size: .95rem;
}

.jbp-modal__description p { margin: 0 0 1rem; }
.jbp-modal__description ul,
.jbp-modal__description ol { padding-left: 1.5rem; margin: 0 0 1rem; }
.jbp-modal__description li { margin-bottom: .35rem; }

.jbp-modal__divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.75rem 0;
}

.jbp-modal__apply-heading {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color:#00529f !important;
}

/* Inline field errors */
.jbp-field-error {
    display: block;
    font-size: .82rem;
    color: #dc2626;
    margin-top: .3rem;
/*     min-height: 1.1em; */
}

.jbp-input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,.15) !important;
}

/* Success message */
.jbp-form__success {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
    font-size: .92rem;
    line-height: 1.5;
}

.jbp-form__success > svg:first-child {
    flex-shrink: 0;
    margin-top: .1rem;
    color: #059669;
}

.jbp-success-text {
    flex: 1;
}

.jbp-success-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #065f46;
    padding: .15rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    opacity: .65;
    transition: opacity .15s;
}

.jbp-success-dismiss:hover {
    opacity: 1;
}

/* General server-side error */
.jbp-form__general-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: .75rem 1rem;
    font-size: .9rem;
    margin-bottom: 1rem;
}

/* Load More */
.jbp-load-more-wrapper {
    text-align: center;
    margin-top: 2rem;
}

.jbp-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 2.5rem;
    min-width: 160px;
    background: #00529f !important;
    color: #fff;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s;
}

.jbp-load-more-btn:hover:not(:disabled) {
    background: #00529f;
}

.jbp-load-more-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.jbp-load-more-btn__spinner {
    width: 16px;
    height: 16px;
    border-top-color: #fff;
    border-radius: 50%;
    animation: jbp-spin .7s linear infinite;
}

.jbp-form__row {
    margin-bottom: 0;
}
input[type=text], input[type=number], input[type=email], input[type=url] {
    padding: 15px 20px;
    border: 1px solid #f1f1f1;
    margin-bottom: 10px;
    outline: none;
}