/* ===================================================================
   JOB SEARCH BAR + LOCATION MULTI-SELECT — theme #f58634
   =================================================================== */

.job-search-form {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.10);
    padding: 10px;
    margin: 0 auto 25px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 20;
}
.job-search-form * { box-sizing: border-box; }

.job-search-form .jsf-field {
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 15px;
    min-width: 0;
}
.job-search-form .jsf-keyword  { flex: 2 1 0; }
.job-search-form .jsf-location {
    flex: 1 1 0;
    border-left: 1px solid #e6e6e6;
    padding: 0;
    align-self: stretch;
}
.job-search-form .jsf-submit {
    flex: 0 0 auto;
    border-left: 1px solid #e6e6e6;
    padding: 0 0 0 15px;
}

/* Icons */
.job-search-form .jsf-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-right: 10px;
}
.job-search-form .jsf-icon svg { width: 16px; height: 16px; fill: #888; display: block; }

/* Keyword input */
.job-search-form input[type="text"] {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: #0b132b;
    padding: 15px 0;
    height: auto;
    font-family: inherit;
    line-height: 1.2;
}
.job-search-form input[type="text"]::placeholder { color: #9aa0a6; }

/* Submit */
.job-search-form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f58634;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 15px 26px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
    box-shadow: 0 2px 8px rgba(245, 134, 52, 0.35);
    font-family: inherit;
    white-space: nowrap;
}
.job-search-form button[type="submit"]:hover  { background: #d96f1f; }
.job-search-form button[type="submit"]:active { background: #bf5f14; transform: translateY(1px); }
.job-search-form button[type="submit"] svg { width: 16px; height: 16px; fill: #fff; flex: 0 0 auto; }

/* =====================================================
   CUSTOM LOCATION DROPDOWN
   ===================================================== */
.loc-dd { position: relative; width: 100%; height: 100%; display: flex; }

.loc-dd-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 15px;
    font-size: 15px;
    font-family: inherit;
    color: #0b132b;
    cursor: pointer;
    text-align: left;
    gap: 8px;
    height: 100%;
}
.loc-dd-trigger:hover { color: #0b132b; }
.loc-dd-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.loc-dd-caret {
    flex: 0 0 auto;
    width: 12px; height: 12px;
    fill: #555;
    transition: transform .2s ease;
}
.loc-dd.open .loc-dd-caret { transform: rotate(180deg); }

/* Dropdown panel */
.loc-dd-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    width: 100%;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    max-height: 380px;
}
.loc-dd.open .loc-dd-panel { display: flex; }

/* Search box inside panel */
.loc-dd-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}
.loc-dd-search svg { width: 14px; height: 14px; fill: #888; flex: 0 0 auto; }
.loc-dd-search input {
    flex: 1 1 auto;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding: 4px 0;
    font-family: inherit;
    color: #0b132b;
    min-width: 0;
}
.loc-dd-search input::placeholder { color: #9aa0a6; }

/* Checkbox list */
.loc-dd-list {
    overflow-y: auto;
    flex: 1 1 auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
}
.loc-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    user-select: none;
    margin: 0;
    transition: background .15s ease;
}
.loc-dd-item:hover { background: #fff6ef; }
.loc-dd-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.loc-dd-box {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 2px solid #c4c4c4;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: all .15s ease;
}
.loc-dd-item input[type="checkbox"]:checked + .loc-dd-box {
    background: #f58634;
    border-color: #f58634;
}
.loc-dd-item input[type="checkbox"]:checked + .loc-dd-box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.loc-dd-text { flex: 1 1 auto; }

/* Footer with Clear + Done */
.loc-dd-footer {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #eee;
    background: #fafafa;
}
.loc-dd-clear,
.loc-dd-done {
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s ease;
}
.loc-dd-clear {
    background: #f2f2f2;
    color: #555;
}
.loc-dd-clear:hover { background: #e6e6e6; }
.loc-dd-done {
    background: #f58634;
    color: #fff;
}
.loc-dd-done:hover { background: #d96f1f; }

/* Active filter chips */
.job-filter-active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #444;
    margin: 0 0 22px;
    padding-left: 4px;
}
.job-filter-active .chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff1e5;
    border: 1px solid #fdd7b8;
    color: #a04d0c;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
}
.job-filter-active .chip b { color: #7d3a06; }
.job-filter-active .chip-clear {
    background: #fff1f1;
    border-color: #f3c8c8;
    color: #b02424;
    text-decoration: none;
    cursor: pointer;
}
.job-filter-active .chip-clear:hover { background: #ffe4e4; }

/* Empty state */
.job-empty {
    background: #fff;
    border: 1px dashed #dcdcdc;
    border-radius: 12px;
    padding: 50px 25px;
    text-align: center;
    margin-bottom: 30px;
}
.job-empty h3 { margin: 0 0 8px; color: #0b132b; font-size: 22px; }
.job-empty p  { margin: 0 0 20px; color: #666; }
.job-empty-btn {
    display: inline-block;
    background: #f58634;
    color: #fff;
    padding: 11px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(245, 134, 52, 0.30);
}
.job-empty-btn:hover { background: #d96f1f; color: #fff; }

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Tablets (768 – 991) */
@media (max-width: 991px) {
    .job-search-form {
        flex-wrap: wrap;
        padding: 12px;
    }
    .job-search-form .jsf-keyword {
        flex: 1 1 100%;
        border-bottom: 1px solid #e6e6e6;
        padding: 0 10px;
    }
    .job-search-form .jsf-location {
        flex: 1 1 55%;
        border-left: none;
        border-right: 1px solid #e6e6e6;
    }
    .job-search-form .jsf-submit {
        flex: 1 1 40%;
        border-left: none;
        padding: 0 10px;
    }
    .job-search-form button[type="submit"] { width: 100%; }
}

/* Small tablets / large phones (576 – 767) */
@media (max-width: 767px) {
    .job-search-form {
        flex-direction: column;
        flex-wrap: nowrap;
        padding: 10px;
        gap: 0;
    }
    .job-search-form .jsf-field { width: 100%; padding: 0 10px; }
    .job-search-form .jsf-keyword {
        border-bottom: 1px solid #e6e6e6;
        padding-bottom: 4px;
    }
    .job-search-form .jsf-location {
        border-left: none;
        border-right: none;
        border-bottom: 1px solid #e6e6e6;
    }
    .job-search-form .jsf-submit {
        border-left: none;
        padding: 10px;
    }
    .job-search-form button[type="submit"] { width: 100%; padding: 14px; }
    .job-search-form input[type="text"] { padding: 13px 0; font-size: 15px; }

    /* Panel becomes full width */
    .loc-dd-panel {
        position: absolute;
        left: 0;
        right: 0;
        width: calc(100% + 0px);
        min-width: 0;
        max-height: 60vh;
    }
    .loc-dd-trigger { padding: 13px 10px; font-size: 15px; }
}

/* Very small phones (< 420) */
@media (max-width: 419px) {
    .job-search-form .jsf-icon { width: 16px; height: 16px; margin-right: 8px; }
    .job-search-form .jsf-icon svg { width: 14px; height: 14px; }
    .job-search-form input[type="text"] { font-size: 14px; }
    .job-search-form button[type="submit"] { font-size: 14px; padding: 12px; }
    .job-filter-active { font-size: 13px; }
    .loc-dd-panel { max-height: 70vh; }
    .loc-dd-item { padding: 11px 14px; font-size: 15px; }
    .loc-dd-footer button { padding: 10px 16px; font-size: 14px; }
}