/* ==========================================================================
   Pers Jobs - plugin styles
   Color-agnostic: accents come from the theme's CSS custom properties
   (--pers-primary etc.) with safe fallbacks, so it inherits the client's
   chosen color scheme. Only neutral greys are hard-coded.
   ========================================================================== */

/* ---------- shared field look ---------- */
.pers-job-form label,
.pers-job-sfield label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #667085;
    margin: 0 0 5px;
    letter-spacing: .01em;
}
.pers-job-form input[type="text"],
.pers-job-form input[type="number"],
.pers-job-form select,
.pers-job-search input[type="text"],
.pers-job-search input[type="number"],
.pers-job-search select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
    color: #1d2939;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.pers-job-form select,
.pers-job-search select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2210%22%20height%3D%226%22%20viewBox%3D%220%200%2010%206%22%3E%3Cpath%20fill%3D%22%2398a2b3%22%20d%3D%22M0%200l5%206%205-6z%22/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}
.pers-job-form input:focus,
.pers-job-form select:focus,
.pers-job-search input:focus,
.pers-job-search select:focus {
    border-color: var(--pers-primary, #3492e1);
    box-shadow: 0 0 0 3px var(--pers-primary-soft, rgba(52,146,225,.15));
}

/* ---------- sell / edit form ---------- */
.pers-job-form {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    background: #fff;
}
.pers-job-form-title,
.pers-job-detail-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: #1d2939;
}
.pers-job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 16px;
}
.pers-job-suffix {
    font-size: 12px;
    color: #98a2b3;
    margin-left: 6px;
}
.pers-job-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
.pers-job-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #344054;
    margin: 0;
}
.pers-job-check input { margin: 0; }

/* ---------- search filter panel (inside the Pers "Filters" panel) ---------- */
.pers-job-search { margin: 4px 0 0; }
.pers-job-search-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: #1d2939;
    padding-top: 10px;
    border-top: 1px solid #eef0f4;
}
/* Two clean columns in the wider Filters popover. */
.pers-job-search-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}
.pers-job-sfield { min-width: 0; }
.pers-job-range {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pers-job-range input { text-align: center; min-width: 0; }
.pers-job-range span { color: #98a2b3; flex: 0 0 auto; }
/* Checkbox-group fields (languages, benefits) span the full width. */
.pers-job-sfield-multi { grid-column: 1 / -1; }

@media (max-width: 600px) {
    .pers-job-search-grid { grid-template-columns: 1fr; }
}

/* ---------- item detail spec block ---------- */
.pers-job-detail {
    margin: 20px 0;
    padding: 18px;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    background: #fff;
}
.pers-job-detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 24px;
}
.pers-job-detail-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f2f4f7;
    font-size: 14px;
}
.pers-job-detail-list li .fa {
    width: 18px;
    text-align: center;
    color: var(--pers-primary, #3492e1);
    flex: 0 0 auto;
}
.pers-job-detail-list .pers-job-k {
    color: #667085;
    margin-right: auto;
}
.pers-job-detail-list .pers-job-v {
    color: #1d2939;
    font-weight: 600;
    text-align: right;
}

@media (max-width: 767px) {
    .pers-job-grid,
    .pers-job-search-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Sell / edit form fix
   The plugin's item_form output renders inside the theme's <div class="custombox">,
   whose generic form rules (label width:25% + float:left + text-align:right, and
   select/text width:62.6%) squash the plugin's own two-column grid: labels get
   centred/right-aligned and wrap to two lines, which knocks the left/right column
   inputs out of vertical alignment. These rules are scoped to .custombox so they
   only apply on the post/edit form (the search filter panel is untouched) and
   carry enough specificity to reset those inherited properties cleanly.
   ========================================================================== */
.custombox .pers-job-form label {
    float: none;
    width: auto;
    max-width: none;
    text-align: left;
    padding: 0;
    margin: 0 0 5px;
    min-height: 0;
    line-height: 1.3;
}
.custombox .pers-job-form input[type="text"],
.custombox .pers-job-form input[type="number"],
.custombox .pers-job-form select,
.custombox .pers-job-form textarea {
    width: 100%;
    float: none;
    margin: 0;
}
.custombox .pers-job-form .pers-job-range input { width: 100%; }
/* checkbox-group (Languages / Benefits): keep chips inline, not floated/right-aligned */
.custombox .pers-job-form .pers-job-checks label {
    float: none;
    width: auto;
    text-align: left;
    padding: 0;
    margin: 0;
    min-height: 0;
}
.custombox .pers-job-form .pers-job-checks input[type="checkbox"] {
    float: none;
    width: auto;
    margin: 0;
}
