/* =========================================================================
   post-job.css
   Custom stylesheet for post-job.php — scoped entirely under the
   nm-post-job- prefix so it cannot collide with the existing site theme.
   ========================================================================= */

:root {
    --nm-post-job-blue-50:  #f2f8fd;
    --nm-post-job-blue-100: #e4f0fb;
    --nm-post-job-blue-200: #cde5f7;
    --nm-post-job-blue-300: #a9d3f0;
    --nm-post-job-blue-500: #2f7fd1;
    --nm-post-job-blue-600: #2367ac;
    --nm-post-job-blue-700: #1c5286;

    --nm-post-job-ink-900: #14232f;
    --nm-post-job-ink-700: #35495a;
    --nm-post-job-ink-500: #64798c;
    --nm-post-job-ink-300: #a4b4c2;

    --nm-post-job-white: #ffffff;
    --nm-post-job-border: #dde7ef;
    --nm-post-job-border-soft: #eaf1f7;

    --nm-post-job-danger: #c23b3b;
    --nm-post-job-danger-bg: #fdecec;

    --nm-post-job-radius-sm: 8px;
    --nm-post-job-radius-md: 12px;
    --nm-post-job-radius-lg: 18px;

    --nm-post-job-shadow: 0 1px 2px rgba(20, 35, 47, 0.04), 0 8px 24px rgba(20, 35, 47, 0.05);
    --nm-post-job-shadow-focus: 0 0 0 3px rgba(47, 127, 209, 0.18);

    --nm-post-job-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------------
   Reset / base
--------------------------------------------------------------------- */
.nm-post-job-body {
    margin: 0;
    font-family: var(--nm-post-job-font);
    background: linear-gradient(180deg, var(--nm-post-job-blue-50) 0%, #ffffff 320px);
    color: var(--nm-post-job-ink-900);
    -webkit-font-smoothing: antialiased;
}

.nm-post-job-wrap * ,
.nm-post-job-wrap *::before,
.nm-post-job-wrap *::after {
    box-sizing: border-box;
}

.nm-post-job-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* ---------------------------------------------------------------------
   Header
--------------------------------------------------------------------- */
.nm-post-job-header {
    padding: 40px 0 28px;
}

.nm-post-job-eyebrow {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nm-post-job-blue-600);
    background: var(--nm-post-job-blue-100);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.nm-post-job-title {
    margin: 0 0 8px;
    font-size: clamp(26px, 3.4vw, 34px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--nm-post-job-ink-900);
}

.nm-post-job-subtitle {
    margin: 0;
    max-width: 640px;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--nm-post-job-ink-500);
}

.nm-post-job-required-mark {
    color: var(--nm-post-job-blue-500);
}

/* ---------------------------------------------------------------------
   Layout: nav + form
--------------------------------------------------------------------- */
.nm-post-job-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
}

@media (min-width: 960px) {
    .nm-post-job-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 40px;
    }
}

.nm-post-job-nav {
    display: none;
}

@media (min-width: 960px) {
    .nm-post-job-nav {
        display: block;
        position: sticky;
        top: 28px;
    }
}

.nm-post-job-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--nm-post-job-border-soft);
}

.nm-post-job-nav-link {
    display: block;
    padding: 8px 0 8px 16px;
    margin-left: -2px;
    border-left: 2px solid transparent;
    font-size: 13.5px;
    color: var(--nm-post-job-ink-500);
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nm-post-job-nav-link:hover {
    color: var(--nm-post-job-blue-600);
}

.nm-post-job-nav-link-active {
    color: var(--nm-post-job-blue-600);
    border-left-color: var(--nm-post-job-blue-500);
    font-weight: 600;
}

.nm-post-job-main {
    min-width: 0;
}

/* ---------------------------------------------------------------------
   Cards / sections
--------------------------------------------------------------------- */
.nm-post-job-card {
    background: var(--nm-post-job-white);
    border: 1px solid var(--nm-post-job-border);
    border-radius: var(--nm-post-job-radius-lg);
    box-shadow: var(--nm-post-job-shadow);
    padding: 26px 22px;
    margin-bottom: 20px;
    scroll-margin-top: 24px;
}

@media (min-width: 640px) {
    .nm-post-job-card {
        padding: 32px 34px;
    }
}

.nm-post-job-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.nm-post-job-card-number {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--nm-post-job-blue-100);
    color: var(--nm-post-job-blue-700);
    font-size: 13px;
    font-weight: 700;
}

.nm-post-job-card-title {
    margin: 0 0 4px;
    font-size: 18.5px;
    font-weight: 700;
    color: var(--nm-post-job-ink-900);
}

.nm-post-job-card-desc {
    margin: 0;
    font-size: 13.5px;
    color: var(--nm-post-job-ink-500);
    line-height: 1.5;
}

/* ---------------------------------------------------------------------
   Fields / grid
--------------------------------------------------------------------- */
.nm-post-job-field {
    margin-bottom: 20px;
    position: relative;
}

.nm-post-job-field:last-child {
    margin-bottom: 0;
}

.nm-post-job-grid-2,
.nm-post-job-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .nm-post-job-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
    .nm-post-job-grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.nm-post-job-field-full {
    grid-column: 1 / -1;
}

.nm-post-job-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--nm-post-job-ink-700);
}

.nm-post-job-optional {
    font-weight: 400;
    color: var(--nm-post-job-ink-300);
    font-size: 12.5px;
}

.nm-post-job-hint {
    margin: 6px 0 0;
    font-size: 12.5px;
    color: var(--nm-post-job-ink-500);
    line-height: 1.5;
}

.nm-post-job-hint code {
    background: var(--nm-post-job-blue-50);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11.5px;
}

.nm-post-job-error {
    display: block;
    min-height: 16px;
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--nm-post-job-danger);
}

/* ---------------------------------------------------------------------
   Inputs
--------------------------------------------------------------------- */
.nm-post-job-input,
.nm-post-job-select,
.nm-post-job-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--nm-post-job-ink-900);
    background: var(--nm-post-job-white);
    border: 1.5px solid var(--nm-post-job-border);
    border-radius: var(--nm-post-job-radius-sm);
    padding: 11px 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nm-post-job-textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.55;
}

.nm-post-job-select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364798c'><path d='M5.5 7.5L10 12l4.5-4.5' stroke='%2364798c' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.nm-post-job-input:hover,
.nm-post-job-select:hover,
.nm-post-job-textarea:hover {
    border-color: var(--nm-post-job-blue-300);
}

.nm-post-job-input:focus,
.nm-post-job-select:focus,
.nm-post-job-textarea:focus {
    outline: none;
    border-color: var(--nm-post-job-blue-500);
    box-shadow: var(--nm-post-job-shadow-focus);
}

.nm-post-job-input::placeholder,
.nm-post-job-textarea::placeholder {
    color: var(--nm-post-job-ink-300);
}

.nm-post-job-input-date {
    max-width: 240px;
}

.nm-post-job-hidden-textarea {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ---------------------------------------------------------------------
   Radio group (Job Type)
--------------------------------------------------------------------- */
.nm-post-job-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.nm-post-job-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1.5px solid var(--nm-post-job-border);
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--nm-post-job-ink-700);
    cursor: pointer;
    background: var(--nm-post-job-white);
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nm-post-job-radio:has(input:checked) {
    border-color: var(--nm-post-job-blue-500);
    background: var(--nm-post-job-blue-50);
    color: var(--nm-post-job-blue-700);
    font-weight: 600;
}

.nm-post-job-radio input {
    accent-color: var(--nm-post-job-blue-500);
    margin: 0;
}

/* ---------------------------------------------------------------------
   Rich text editor (Gutenberg-like)
--------------------------------------------------------------------- */
.nm-post-job-editor {
    border: 1.5px solid var(--nm-post-job-border);
    border-radius: var(--nm-post-job-radius-md);
    overflow: hidden;
    background: var(--nm-post-job-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nm-post-job-editor:focus-within {
    border-color: var(--nm-post-job-blue-500);
    box-shadow: var(--nm-post-job-shadow-focus);
}

.nm-post-job-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: var(--nm-post-job-blue-50);
    border-bottom: 1px solid var(--nm-post-job-border-soft);
}

.nm-post-job-editor-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--nm-post-job-ink-700);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nm-post-job-editor-btn:hover {
    background: var(--nm-post-job-white);
    border-color: var(--nm-post-job-border);
}

.nm-post-job-editor-sep {
    width: 1px;
    height: 20px;
    background: var(--nm-post-job-border);
    margin: 0 4px;
}

.nm-post-job-editor-area {
    min-height: 220px;
    padding: 18px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--nm-post-job-ink-900);
    outline: none;
}

.nm-post-job-editor-area.nm-post-job-editor-empty::before {
    content: attr(data-placeholder);
    color: var(--nm-post-job-ink-300);
    pointer-events: none;
}

.nm-post-job-editor-area h2 {
    font-size: 21px;
    margin: 0.6em 0 0.4em;
}

.nm-post-job-editor-area h3 {
    font-size: 17.5px;
    margin: 0.6em 0 0.4em;
}

.nm-post-job-editor-area p {
    margin: 0 0 0.9em;
}

.nm-post-job-editor-area ul,
.nm-post-job-editor-area ol {
    margin: 0 0 0.9em;
    padding-left: 22px;
}

.nm-post-job-editor-area blockquote {
    margin: 0 0 0.9em;
    padding: 4px 0 4px 16px;
    border-left: 3px solid var(--nm-post-job-blue-300);
    color: var(--nm-post-job-ink-500);
    font-style: italic;
}

.nm-post-job-editor-area a {
    color: var(--nm-post-job-blue-600);
}

/* ---------------------------------------------------------------------
   Combobox (category / location search)
--------------------------------------------------------------------- */
.nm-post-job-combobox {
    position: relative;
}

.nm-post-job-combobox-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    background: var(--nm-post-job-white);
    border: 1px solid var(--nm-post-job-border);
    border-radius: var(--nm-post-job-radius-sm);
    box-shadow: var(--nm-post-job-shadow);
}

.nm-post-job-combobox-option {
    padding: 9px 11px;
    border-radius: 6px;
    font-size: 14px;
    color: var(--nm-post-job-ink-900);
    cursor: pointer;
}

.nm-post-job-combobox-option:hover,
.nm-post-job-combobox-option-active {
    background: var(--nm-post-job-blue-50);
}

.nm-post-job-combobox-empty {
    padding: 9px 11px;
    font-size: 13.5px;
    color: var(--nm-post-job-ink-500);
}

/* ---------------------------------------------------------------------
   Featured image dropzone
--------------------------------------------------------------------- */
.nm-post-job-dropzone {
    position: relative;
    border: 1.5px dashed var(--nm-post-job-border);
    border-radius: var(--nm-post-job-radius-md);
    background: var(--nm-post-job-blue-50);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.nm-post-job-dropzone:hover,
.nm-post-job-dropzone-active {
    border-color: var(--nm-post-job-blue-500);
    background: var(--nm-post-job-blue-100);
}

.nm-post-job-dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--nm-post-job-white);
    color: var(--nm-post-job-blue-600);
    font-size: 16px;
    margin-bottom: 10px;
}

.nm-post-job-dropzone-text {
    margin: 0 0 4px;
    font-size: 14px;
    color: var(--nm-post-job-ink-700);
}

.nm-post-job-dropzone-browse {
    color: var(--nm-post-job-blue-600);
    font-weight: 600;
    text-decoration: underline;
}

.nm-post-job-dropzone-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.nm-post-job-dropzone-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: var(--nm-post-job-radius-sm);
    box-shadow: var(--nm-post-job-shadow);
}

.nm-post-job-remove-image-btn {
    border: 1px solid var(--nm-post-job-border);
    background: var(--nm-post-job-white);
    color: var(--nm-post-job-ink-700);
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
}

.nm-post-job-remove-image-btn:hover {
    border-color: var(--nm-post-job-danger);
    color: var(--nm-post-job-danger);
}

.nm-post-job-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ---------------------------------------------------------------------
   Review / submit
--------------------------------------------------------------------- */
.nm-post-job-card-review {
    background: linear-gradient(180deg, var(--nm-post-job-white), var(--nm-post-job-blue-50));
}

.nm-post-job-notice {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--nm-post-job-ink-700);
    background: var(--nm-post-job-blue-50);
    border: 1px solid var(--nm-post-job-blue-200);
    border-radius: var(--nm-post-job-radius-sm);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.nm-post-job-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.nm-post-job-btn {
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 999px;
    padding: 13px 28px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.nm-post-job-btn-primary {
    background: var(--nm-post-job-blue-500);
    color: var(--nm-post-job-white);
    box-shadow: 0 6px 18px rgba(47, 127, 209, 0.28);
}

.nm-post-job-btn-primary:hover {
    background: var(--nm-post-job-blue-600);
}

.nm-post-job-btn-primary:active {
    transform: translateY(1px);
}

.nm-post-job-btn:focus-visible,
.nm-post-job-editor-btn:focus-visible,
.nm-post-job-nav-link:focus-visible,
.nm-post-job-input:focus-visible,
.nm-post-job-select:focus-visible,
.nm-post-job-textarea:focus-visible {
    outline: 2px solid var(--nm-post-job-blue-500);
    outline-offset: 2px;
}

.nm-post-job-actions-note {
    font-size: 12.5px;
    color: var(--nm-post-job-ink-500);
}

/* ---------------------------------------------------------------------
   Reduced motion
--------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .nm-post-job-wrap * {
        transition: none !important;
    }
}