/* WP Job Portal — Quick Apply as popup modal, with External Application URL bypass */

/* Scoped to the job detail Quick Apply form only. The .tta-apply-modal class is
   added by theme.js, so without JS the form stays visible and usable. */
.wpjobportal-quickapply-form.tta-apply-modal .wjportal-form {
    display: none;
}

.wpjobportal-quickapply-form.tta-apply-modal .wjportal-form.is-modal-open {
    display: block;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    background: #fff;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body.wjportal-modal-active::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99998;
}

.wjportal-apply-now-btn {
    display: inline-block;
    background: #14b8a6;
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.wjportal-apply-now-btn:hover {
    background: #0f9c8f;
}

.wjportal-modal-close {
    position: absolute;
    top: 8px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.wjportal-modal-close:hover {
    color: #000;
}

/* Custom-field rows flagged by theme.js (e.g. External Application URL) */
.wjportal-elegant-addon-job-data.wjportal-field-hidden,
.wjportal-elegant-addon-custom-field.wjportal-field-hidden {
    display: none !important;
}

/* Visually hidden, still read by screen readers (search labels, "opens in a new tab") */
.tta-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Job detail / closed job pages (templates/job-detail.twig, job-closed.twig). The hero is the
   theme's regular sub-page hero; breadcrumb + back link sit at the top of the content area. */
.tta-job-nav {
    padding-top: 24px;
    text-align: left;
}

.tta-job-nav__back-wrap {
    text-align: left;
}

.tta-job-nav__back {
    display: inline-block;
    margin-top: 8px;
    color: var(--dark-blue);
    font-weight: 600;
    text-decoration: none;
}

.tta-job-nav__back:hover {
    text-decoration: underline;
}

.tta-job-detail__head {
    padding-top: 16px;
}

.tta-job-detail__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--dark-grey);
}

.tta-job-detail__facts li {
    margin: 0;
}

.tta-job-detail__facts li + li::before {
    content: "·";
    margin: 0 10px;
}

.tta-job-detail a:focus-visible {
    outline: 3px solid var(--dark-blue);
    outline-offset: 3px;
}

.tta-job-detail__body {
    padding-top: 24px;
    padding-bottom: 48px;
}

.tta-job-closed__body {
    padding-top: 32px;
    padding-bottom: 56px;
    text-align: left;
}

.tta-job-closed__intro {
    max-width: 720px;
    font-size: 18px;
    line-height: 1.5em;
}

.tta-job-closed__list {
    margin: 24px 0 32px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--light-grey);
}

.tta-job-closed__list li {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    align-items: baseline;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--light-grey);
}

.tta-job-closed__list a {
    color: var(--dark-blue);
    font-weight: 600;
}

.tta-job-closed__list span {
    color: var(--dark-grey);
}

.tta-job-closed__more {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* The hero H1 already shows the job title */
.tta-job-detail .wjportal-page-heading {
    display: none;
}

@media (max-width: 766px) {
    .tta-job-closed__more .btn {
        display: block;
        width: 100%;
        text-align: center;
    }
}
