/**
 * Стили формы размещения вакансии (дашборд работодателя)
 * form#job-posting-form, #dashboard-tab-user-job
 */

/* ========== Описание вакансии: высота окна ввода текста ========== */
#job-posting-form #job_detail.wp-editor-area,
#job-posting-form .wp-editor-wrap .wp-editor-area {
    min-height: 400px !important;
    height: 400px !important;
}

/* ========== Ряд зарплаты: уменьшить ширину селекта «в месяц», выровнять ряд ========== */
#job-posting-form li.jobsearch-column-12 .salary-type {
    max-width: 180px;
    width: 180px;
}
#job-posting-form li.jobsearch-column-12 .salary-type .jobsearch-profile-select,
#job-posting-form li.jobsearch-column-12 .salary-type .selectize-control {
    max-width: 100%;
}
#job-posting-form li.jobsearch-column-12 .salary-input.salary-input-fordev {
    width: calc(100% - 190px);
}

/* ========== Зарплата: без обозначения валюты в ячейках мин/макс (только поля ввода) ========== */
#job-posting-form .salary-input-fordev .min-salary span,
#job-posting-form .salary-input-fordev .max-salary span {
    display: none !important;
}
#job-posting-form .salary-input-fordev .min-salary input[type="number"],
#job-posting-form .salary-input-fordev .max-salary input[type="number"] {
    padding-left: 12px;
    padding-right: 28px; /* место под стрелки +/- */
}
#job-posting-form .salary-input-fordev .min-salary,
#job-posting-form .salary-input-fordev .max-salary {
    position: relative;
}

/* ========== Блок валюты: скрыть Позиция валюты, Разделитель тысяч, Знаков после запятой ========== */
#job-posting-form .jobsalary-curency-con .jobsearch-row .jobsearch-column-3:nth-child(2),
#job-posting-form .jobsalary-curency-con .jobsearch-row .jobsearch-column-3:nth-child(3),
#job-posting-form .jobsalary-curency-con .jobsearch-row .jobsearch-column-3:nth-child(4) {
    display: none !important;
}
#job-posting-form .jobsalary-curency-con .jobsearch-row .jobsearch-column-3:first-child {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
}

/* ========== Ряд зарплаты + блок «Валюта зарплаты» в одну строку (валюта последняя) ========== */
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.jobsearch-column-12 {
    width: 100%;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.careerfy-child-salary-row,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.jobsalary-curency-con {
    width: 50%;
    flex: 0 0 50%;
    box-sizing: border-box;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.jobsalary-curency-con {
    order: 1;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.careerfy-child-salary-row {
    order: 0;
}
@media (max-width: 768px) {
    #job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.careerfy-child-salary-row,
    #job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.jobsalary-curency-con {
        width: 100%;
        flex: 0 0 100%;
        order: unset;
    }
}

/* ========== Секции «Вопросы при подаче заявки» и «Прикрепленные файлы» — свёрнуты по умолчанию ========== */
#job-posting-form .jobsearch-employer-box-section.careerfy-child-collapsed .careerfy-child-section-body {
    display: none;
}
#job-posting-form .jobsearch-employer-box-section.careerfy-child-collapsible .jobsearch-profile-title {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 28px;
}
#job-posting-form .jobsearch-employer-box-section.careerfy-child-collapsible .jobsearch-profile-title::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s ease;
}
#job-posting-form .jobsearch-employer-box-section.careerfy-child-collapsible:not(.careerfy-child-collapsed) .jobsearch-profile-title::after {
    transform: translateY(-50%) rotate(180deg);
}

/* ========== Первый блок: заголовок + компактный бар шагов справа ========== */
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    padding-right: 188px;
    min-height: 52px;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title h2 {
    margin: 0;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title {
    border-bottom: none !important;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav {
    margin: 0 0 0 auto;
    max-width: 62%;
    font-size: 12px;
    line-height: 1.2;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px 10px;
    text-align: right;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav a,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav span,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav li {
    font-size: inherit;
    line-height: inherit;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav > ul,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav ul {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav > ul > li,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav li i,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav li .step-num,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav li .jobsearch-step-icon,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title .jobsearch-employer-jobnav li::before {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    line-height: 32px !important;
    border-radius: 50% !important;
    font-size: 13px !important;
    box-sizing: border-box;
}

/* ========== Вертикальный stepper (desktop) ========== */
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper {
    position: absolute;
    top: 0;
    right: 0;
    transform: none;
    z-index: 2;
    background: rgba(255, 255, 255, 0.98);
    padding: 12px 10px;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
    width: fit-content;
    min-width: 0;
    max-width: 180px;
    margin: 0;
    transition: all 0.22s ease;
    cursor: pointer;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(90deg, #4f46e5 0%, #818cf8 50%, #e5e7eb 100%);
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 4px 0 0;
    gap: 0;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 0;
    opacity: 0.58;
    transition: all 0.25s ease;
    margin: 0;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item::before {
    content: none !important;
    display: none !important;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 16px;
    top: calc(50% + 16px);
    width: 2px;
    height: 16px;
    background: linear-gradient(180deg, #e0e0e0 0%, #f2f2f2 100%);
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.active,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.completed {
    opacity: 1;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.active:not(:last-child)::after,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.completed:not(:last-child)::after {
    background: linear-gradient(180deg, #4f46e5 0%, #818cf8 100%);
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .step-indicator {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    position: relative;
    z-index: 2;
    transition: all 0.25s ease;
    box-sizing: border-box;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.active .step-indicator {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: #4f46e5;
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
    transform: none;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.completed .step-indicator {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-color: #10b981;
    color: transparent;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.completed .step-indicator::before {
    content: '✓';
    color: #fff;
    font-size: 14px;
    line-height: 1;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .step-label {
    font-size: 12px;
    line-height: 1.25;
    color: #6b7280;
    font-weight: 500;
    white-space: normal;
    max-width: 100px;
    transition: all 0.25s ease;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.active .step-label,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item.completed .step-label {
    color: #111827;
    font-weight: 600;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper .careerfy-child-step-item:hover {
    opacity: 0.9;
    transform: translateX(-2px);
}

/* Свернутый режим: мини-иконка текущего шага */
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper.is-collapsed .careerfy-child-step-item {
    display: none;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper.is-collapsed .careerfy-child-step-item.active {
    display: flex;
    min-height: 32px;
    padding: 0;
    justify-content: center;
    gap: 0;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper.is-collapsed .careerfy-child-step-item.active::after {
    display: none;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper.is-collapsed {
    min-width: 52px;
    width: 52px;
    max-width: 52px;
    height: 52px;
    padding: 8px;
    border-radius: 999px;
    overflow: hidden;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper.is-collapsed::before {
    display: none;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper.is-collapsed .careerfy-child-step-list {
    padding: 0;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper.is-collapsed .careerfy-child-step-item .step-label {
    display: none;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper.is-collapsed .careerfy-child-step-item .step-indicator {
    margin: 0;
}

/* ========== Секция custom_fields_skillid скрыта после переноса полей ========== */
#job-posting-form .jobsearch-employer-box-section.custom_fields_skillid.careerfy-child-custom-section-hidden {
    display: none !important;
}

/* ========== Секция «Прием заявок на вакансию» ========== */
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section {
    margin-top: 20px;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section > .jobsearch-row.jobsearch-employer-profile-form {
    display: flex;
    flex-wrap: wrap;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section > .jobsearch-row.jobsearch-employer-profile-form > li {
    box-sizing: border-box;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section > .jobsearch-row.jobsearch-employer-profile-form > li.jobsearch-column-6 {
    width: 50%;
    flex: 0 0 50%;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section > .jobsearch-row.jobsearch-employer-profile-form > li.careerfy-child-apply-bottom-row {
    width: 100%;
    flex: 0 0 100%;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section label .careerfy-child-apply-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    color: #4f46e5;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section label .careerfy-child-apply-help .fa {
    font-size: 13px;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section label .careerfy-child-apply-help-popup {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    transform: none;
    width: 380px;
    max-width: min(380px, 86vw);
    background: #111827;
    color: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 400;
    text-align: left;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    z-index: 30;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section label .careerfy-child-apply-help-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 10px;
    transform: none;
    width: 12px;
    height: 12px;
    background: #111827;
    rotate: 45deg;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section label .careerfy-child-apply-help-popup strong {
    color: #0a65fc;
}
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section label .careerfy-child-apply-help:hover .careerfy-child-apply-help-popup,
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section label .careerfy-child-apply-help:focus .careerfy-child-apply-help-popup,
#job-posting-form.careerfy-child-job-form .careerfy-child-apply-section label .careerfy-child-apply-help:focus-within .careerfy-child-apply-help-popup {
    display: block;
}

/* Унифицируем дизайн стандартных тултипов с иконкой "?" в форме вакансии */
#job-posting-form.careerfy-child-job-form .job-phone-tooltip-icon {
    color: #0a65fc;
}
#job-posting-form.careerfy-child-job-form .job-phone-tooltip-icon .job-phone-tooltip-popup {
    background: #111827;
    color: #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    line-height: 1.45;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(10, 101, 252, 0.2);
}
#job-posting-form.careerfy-child-job-form .job-phone-tooltip-icon .job-phone-tooltip-popup strong,
#job-posting-form.careerfy-child-job-form .job-phone-help-text strong {
    color: #0a65fc;
}

/* ========== Зарплата + валюта в одном ряду (Desktop) ========== */
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.careerfy-child-salary-row,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.jobsalary-curency-con {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
    order: 80 !important;
}

/* Фолбэк для темы/плагина: принудительно держим "Зарплата" и "Валюта" в одном ряду */
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.careerfy-child-salary-row,
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.jobsalary-curency-con {
    float: left !important;
    clear: none !important;
    display: block !important;
    box-sizing: border-box;
}
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.jobsalary-curency-con {
    margin-top: 0 !important;
    order: 81 !important;
}

/* Динамические подсказки навыков при вводе */
.suggested-skills-con .careerfy-child-skills-filtered {
    display: block;
}
.suggested-skills-con .careerfy-child-skills-empty {
    float: none;
    cursor: default;
    background: transparent;
    border: none;
    padding: 4px 0;
    color: #888;
}
.suggested-skills-con .careerfy-child-skills-empty:before {
    content: none;
}

/* "Требуемые навыки" всегда последним в секции */
#job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.careerfy-child-skills-last {
    order: 999 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
    clear: both !important;
}

/* ========== Адаптив ========== */
@media (max-width: 992px) {
    #job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title {
        align-items: flex-start;
        flex-direction: column;
        padding-right: 0;
        min-height: 0;
    }
    #job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper {
        position: relative;
        top: auto;
        right: auto;
        margin-left: auto;
        min-width: 156px;
        padding: 14px 12px;
    }
}

@media (max-width: 768px) {
    #job-posting-form.careerfy-child-job-form .jobsearch-employer-box-section:first-child > .jobsearch-profile-title > .jobsearch-employer-jobnav.careerfy-child-vertical-stepper {
        display: none !important;
    }
    #job-posting-form.careerfy-child-job-form .careerfy-child-apply-section > .jobsearch-row.jobsearch-employer-profile-form > li.jobsearch-column-6,
    #job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.careerfy-child-salary-row,
    #job-posting-form.careerfy-child-job-form .jobsearch-employer-profile-form > li.jobsalary-curency-con {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        float: none !important;
    }
}
