/* Syndicate Careers — public styles
   Brand: navy #002a5c (primary) + gold #FAC000 (accent) */

.sc-wrap {
    /* Brand colors — defaults; overridden by inline <style> from plugin settings */
    --sc-navy:        #002a5c;
    --sc-gold:        #FAC000;
    --sc-on-navy:     #ffffff;
    --sc-on-gold:     #002a5c;
    /* Derived hover states (auto-darken whatever the user picks) */
    --sc-navy-dark:   color-mix(in srgb, var(--sc-navy) 82%, #000);
    --sc-gold-dark:   color-mix(in srgb, var(--sc-gold) 85%, #000);
    /* Neutrals */
    --sc-text:        #1a2238;
    --sc-muted:       #5a6478;
    --sc-border:      #e3e7ee;
    --sc-bg-soft:     #f7f8fb;
    --sc-bg-tag:      #eef1f7;
    --sc-bg-tag-text: #2c3654;
}

.sc-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1rem;
    font-family: inherit;
    color: var(--sc-text);
}
.sc-wrap *, .sc-wrap *::before, .sc-wrap *::after { box-sizing: border-box; }

.sc-h2 {
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
    color: var(--sc-navy);
    line-height: 1.2;
}
.sc-h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    color: var(--sc-navy);
}
.sc-lead {
    color: var(--sc-muted);
    margin: 0 0 1.5rem;
    font-size: 1.02rem;
    line-height: 1.65;
}
.sc-divider {
    border: 0;
    border-top: 1px solid var(--sc-border);
    margin: 2.5rem 0 1.5rem;
}

/* Public search/filter bar */
.sc-public-filters {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 1.25rem;
    padding: .85rem 1rem;
    background: var(--sc-bg-soft);
    border: 1px solid var(--sc-border);
    border-radius: 10px;
}
.sc-public-filters input[type="text"],
.sc-public-filters select {
    flex: 1 1 180px;
    min-width: 0;
    border: 1px solid #cdd3df;
    border-radius: 8px;
    padding: .55rem .8rem;
    font-size: .95rem;
    font-family: inherit;
    background: #fff;
    color: var(--sc-text);
}
.sc-public-filters input[type="text"]:focus,
.sc-public-filters select:focus {
    outline: none;
    border-color: var(--sc-navy);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-navy) 18%, transparent);
}
.sc-public-filters .sc-btn-primary {
    padding: .6rem 1.3rem;
    font-size: .95rem;
    width: auto;
    max-width: none;
}
.sc-public-filters-clear {
    color: var(--sc-muted);
    text-decoration: none;
    font-size: .9rem;
    padding: 0 .5rem;
}
.sc-public-filters-clear:hover { color: var(--sc-navy); text-decoration: underline; }

.sc-empty {
    background: #fff;
    border: 1px dashed var(--sc-border);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    color: var(--sc-muted);
    margin-bottom: 1.5rem;
}
.sc-empty a { color: var(--sc-navy); }

/* Jobs list */
.sc-jobs {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    gap: 1rem;
}
.sc-job {
    background: #fff;
    border: 1px solid var(--sc-border);
    border-left: 4px solid var(--sc-gold);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.sc-job:hover {
    border-color: var(--sc-border);
    border-left-color: var(--sc-navy);
    box-shadow: 0 6px 22px rgba(0, 42, 92, .08);
}
.sc-job-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}
.sc-job-title {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--sc-navy);
}
.sc-job-meta {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    margin: .5rem 0;
}
.sc-tag {
    display: inline-flex;
    align-items: center;
    padding: .28rem .7rem;
    background: var(--sc-bg-tag);
    color: var(--sc-bg-tag-text);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.2;
}
.sc-tag-deadline {
    background: #fff5d6;
    color: #7a5500;
}
.sc-job-body {
    margin: .75rem 0 1rem;
    color: var(--sc-text);
    line-height: 1.65;
    font-size: .96rem;
}
.sc-apply-block {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--sc-border);
}
.sc-apply-block.is-open { display: block; }

/* Buttons */
.sc-btn {
    display: inline-block;
    padding: .75rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: .95rem;
    line-height: 1.2;
    transition: transform .08s, background .15s, color .15s, box-shadow .15s;
    font-family: inherit;
}
.sc-btn-apply {
    background: var(--sc-gold);
    color: #ffffff;
}
.sc-btn-apply:hover {
    background: var(--sc-gold-dark);
    color: #ffffff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--sc-gold) 50%, transparent);
}
.sc-btn-primary {
    background: var(--sc-navy);
    color: var(--sc-on-navy);
    padding: .95rem 2rem;
    font-size: 1rem;
    width: 100%;
    max-width: 320px;
}
.sc-btn-primary:hover {
    background: var(--sc-navy-dark);
    color: var(--sc-on-navy);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--sc-navy) 30%, transparent);
}

/* Form */
.sc-form {
    background: var(--sc-bg-soft);
    border: 1px solid var(--sc-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
}
.sc-form-compact {
    background: #fff;
    border: none;
    padding: .25rem 0;
}

.sc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sc-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .9rem;
    min-width: 0; /* prevent overflow in grid */
}
.sc-field > span {
    font-weight: 600;
    color: var(--sc-text);
    font-size: .88rem;
}
.sc-field input,
.sc-field textarea,
.sc-field select {
    width: 100%;
    border: 1px solid #cdd3df;
    border-radius: 8px;
    padding: .75rem .9rem;
    font-size: 1rem; /* 16px+ prevents iOS auto-zoom */
    font-family: inherit;
    background: #fff;
    color: var(--sc-text);
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
    -webkit-appearance: none;
}
.sc-field textarea { resize: vertical; min-height: 110px; }
.sc-field input:focus,
.sc-field textarea:focus,
.sc-field select:focus {
    outline: none;
    border-color: var(--sc-navy);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc-navy) 18%, transparent);
}
.sc-field input[disabled] {
    background: #eef1f7;
    color: var(--sc-muted);
    cursor: not-allowed;
}
.sc-field-full { grid-column: 1 / -1; }

.sc-file input[type="file"] {
    padding: .6rem;
    background: #fff;
    cursor: pointer;
    font-size: .9rem;
}
.sc-field em {
    font-style: normal;
    font-weight: 400;
    color: var(--sc-muted);
    font-size: .82rem;
}

.sc-consent {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    font-size: .9rem;
    color: var(--sc-muted);
    line-height: 1.55;
}
.sc-consent input {
    margin-top: .25rem;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--sc-navy);
}

.sc-err {
    color: #b91c1c;
    font-size: .82rem;
    font-weight: 500;
    margin-top: .15rem;
}

.sc-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* Popup modal (post-submit thank-you) */
html.sc-modal-open, html.sc-modal-open body { overflow: hidden; }

.sc-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: sc-modal-fade .25s ease-out;
}
.sc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 40, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.sc-modal-card {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 2.5rem 2.25rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .28), 0 4px 12px rgba(0, 0, 0, .12);
    animation: sc-modal-pop .35s cubic-bezier(.2,1.1,.3,1);
    color: #1a2238;
}
.sc-modal-card .sc-success-icon {
    color: #2d7a47;
    margin-bottom: 1rem;
    display: inline-flex;
}
.sc-modal-card .sc-success-icon svg {
    background: #ecfdf5;
    border: 4px solid #d1f0dc;
    border-radius: 999px;
    padding: .3rem;
}
.sc-modal-card .sc-success-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin: .25rem 0 .75rem;
    color: #14532d;
    letter-spacing: -0.015em;
}
.sc-modal-card .sc-success-msg {
    font-size: 1.02rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 auto 1.5rem;
    max-width: 380px;
}
.sc-modal-card .sc-success-redirect {
    color: #6b7280;
    font-size: .9rem;
    margin: 0 0 1.25rem;
}
.sc-modal-card .sc-success-redirect #sc-countdown {
    font-weight: 700;
    color: #14532d;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    min-width: 1.4em;
    text-align: center;
}
.sc-modal-actions {
    margin-top: .5rem;
}
.sc-modal-actions .sc-btn-primary {
    background: var(--sc-navy);
    color: #fff;
    padding: .8rem 1.75rem;
    font-size: .98rem;
    width: auto;
    max-width: none;
}

@keyframes sc-modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes sc-modal-pop {
    from { opacity: 0; transform: translateY(20px) scale(.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@media (max-width: 480px) {
    .sc-modal-card { padding: 2rem 1.5rem; border-radius: 14px; }
    .sc-modal-card .sc-success-title { font-size: 1.5rem; }
    .sc-modal-card .sc-success-msg { font-size: .95rem; }
}

/* Legacy inline success (no longer used for submit, but kept for safety) */
.sc-success {
    background: #eaf4ed;
    border: 1px solid #b5d8c0;
    border-radius: 14px;
    padding: 2.5rem 2rem;
    text-align: center;
    color: #1d4d2c;
}
.sc-success-icon {
    color: #2d7a47;
    margin-bottom: .75rem;
    display: inline-flex;
}
.sc-success-icon svg {
    background: #fff;
    border-radius: 999px;
    padding: .25rem;
}
.sc-success-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: .25rem 0 .75rem;
    color: #14532d;
    letter-spacing: -0.01em;
}
.sc-success-msg {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 auto 1.5rem;
    max-width: 540px;
    color: #1d4d2c;
}
.sc-success-redirect {
    color: #4b6b58;
    font-size: .95rem;
    margin: 0 0 1.25rem;
}
.sc-success-redirect #sc-countdown {
    font-weight: 700;
    color: #14532d;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    min-width: 1.2em;
    text-align: center;
}

/* ============================================================
   Mobile breakpoints
   ============================================================ */
@media (max-width: 720px) {
    .sc-wrap { padding: 0 .75rem; }
    .sc-form { padding: 1.1rem; }
    .sc-job  { padding: 1.1rem 1.15rem; }
    .sc-job-title { font-size: 1.08rem; }
}

@media (max-width: 600px) {
    .sc-row { grid-template-columns: 1fr; }
    .sc-job-head { flex-direction: column; align-items: stretch; gap: .5rem; }
    .sc-job-meta { margin: .25rem 0 .5rem; }
    .sc-btn-primary { max-width: 100%; }
    .sc-btn-apply { width: 100%; text-align: center; }
}

@media (max-width: 420px) {
    .sc-wrap { padding: 0 .5rem; }
    .sc-form { padding: 1rem .9rem; border-radius: 10px; }
    .sc-job { padding: 1rem .9rem; border-radius: 10px; }
    .sc-h2 { font-size: 1.4rem; }
    .sc-lead { font-size: .95rem; }
}
