/* ==========================================================================
   WW BlueHire — Job Listings CSS
   Part of ww-bp-manager plugin.
   Uses --ww-body-text and --ww-font-body from the BP theme where available.
   ========================================================================== */

/* ── Design tokens ────────────────────────────────────────────────────── */
:root {
    --bh-blue:        #1a4d8f;
    --bh-blue-light:  #2563b0;
    --bh-blue-pale:   #e8f0fb;
    --bh-teal:        #0f766e;
    --bh-teal-pale:   #e0f5f3;
    --bh-amber:       #92400e;
    --bh-amber-pale:  #fef3c7;
    --bh-gray-100:    #f5f5f4;
    --bh-gray-200:    #e7e5e4;
    --bh-gray-400:    #a8a29e;
    --bh-gray-700:    #44403c;
    --bh-gray-900:    #1c1917;
    --bh-radius:      8px;
    --bh-radius-sm:   4px;
    --bh-shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --bh-shadow-hover:0 4px 12px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.08);
    --bh-transition:  180ms ease;
}

/* ── Wrapper ──────────────────────────────────────────────────────────── */
.ww-bh-listings-wrap {
    position: relative;
    font-family: var(--ww-font-body, "Roboto", Arial, sans-serif);
    color: var(--ww-body-text, var(--bh-gray-900));
}

.ww-bh-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bh-blue);
    margin: 0 0 1.25rem;
}

/* ── Filter bar ───────────────────────────────────────────────────────── */
.ww-bh-filters {
    background: var(--bh-gray-100);
    border: 1px solid var(--bh-gray-200);
    border-radius: var(--bh-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.ww-bh-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.ww-bh-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 160px;
    flex: 1 1 160px;
    position: relative;
    padding-bottom: 18px; /* reserves space for absolute hint in all groups uniformly */
}

.ww-bh-filter-group--search { flex: 2 1 240px; }
.ww-bh-filter-group--reset  { flex: 0 0 auto; min-width: auto; justify-content: flex-end; padding-bottom: 18px; }

.ww-bh-filter-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bh-gray-700);
    display: block;
}

.ww-bh-filter-hint {
    font-size: 10px;
    color: var(--bh-gray-400);
    margin: 0;
    line-height: 1.3;
    position: absolute;
    bottom: 2px;
    left: 0;
}

.ww-bh-filters input[type="text"],
.ww-bh-filters select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--bh-gray-200);
    border-radius: var(--bh-radius-sm);
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    color: var(--bh-gray-900);
    width: 100%;
    box-sizing: border-box;
    transition: border-color var(--bh-transition);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23a8a29e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.ww-bh-filters input[type="text"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Ccircle cx='6.5' cy='6.5' r='4' stroke='%23a8a29e' stroke-width='1.5' fill='none'/%3E%3Cpath d='M10 10l3 3' stroke='%23a8a29e' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-position: right 10px center;
    padding-right: 32px;
}

.ww-bh-filters input[type="text"]:focus,
.ww-bh-filters select:focus {
    outline: none;
    border-color: var(--bh-blue-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 176, 0.15);
}

.ww-bh-reset-btn {
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--bh-gray-200);
    border-radius: var(--bh-radius-sm);
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    color: var(--bh-gray-700);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--bh-transition);
}

.ww-bh-reset-btn:hover {
    background: var(--bh-gray-100);
    border-color: var(--bh-gray-400);
}

/* ── Results header ───────────────────────────────────────────────────── */
.ww-bh-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.ww-bh-count {
    font-size: 14px;
    color: var(--bh-gray-700);
}

.ww-bh-count strong {
    color: var(--bh-blue);
    font-weight: 700;
}

/* ── Job grid ─────────────────────────────────────────────────────────── */
.ww-bh-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

/* ── Job card ─────────────────────────────────────────────────────────── */
.ww-bh-card {
    background: #fff;
    border: 1px solid var(--bh-gray-200);
    border-radius: var(--bh-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--bh-shadow);
    transition: box-shadow var(--bh-transition), transform var(--bh-transition), border-color var(--bh-transition);
    position: relative;
    height: 100%;
    box-sizing: border-box;
}

.ww-bh-card:hover {
    box-shadow: var(--bh-shadow-hover);
    transform: translateY(-2px);
    border-color: var(--bh-blue-light);
}

.ww-bh-card--closed {
    opacity: .65;
}

/* Card head */
.ww-bh-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ww-bh-card__icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    background: var(--bh-blue-pale);
    color: var(--bh-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ww-bh-card__type-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bh-blue);
    display: block;
}

.ww-bh-card__date {
    font-size: 11px;
    color: var(--bh-gray-400);
}

/* Card title */
.ww-bh-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: var(--bh-gray-900);
}

.ww-bh-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--bh-transition);
}

.ww-bh-card__title a:hover,
.ww-bh-card__title a:focus {
    color: var(--bh-blue);
}

/* Location + employment type row */
.ww-bh-card__details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--bh-gray-700);
}

.ww-bh-card__location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ww-bh-card__emp-type {
    background: var(--bh-gray-100);
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 11px;
    color: var(--bh-gray-700);
    font-weight: 500;
}

/* Tags */
.ww-bh-card__tags,
.ww-bh-card__details-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ww-bh-tag {
    display: inline-block;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}

.ww-bh-tag--type {
    background: var(--bh-blue-pale);
    color: var(--bh-blue);
}

.ww-bh-tag--level {
    background: var(--bh-teal-pale);
    color: var(--bh-teal);
}

.ww-bh-tag--detail {
    background: var(--bh-amber-pale);
    color: var(--bh-amber);
    font-weight: 500;
}

.ww-bh-tag--more {
    background: var(--bh-gray-100);
    color: var(--bh-gray-400);
    font-weight: 500;
}

/* Salary */
.ww-bh-card__salary {
    font-size: 14px;
    font-weight: 700;
    color: var(--bh-teal);
    margin-top: auto;
}

/* Card footer */
.ww-bh-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--bh-gray-100);
    margin-top: auto;
}

.ww-bh-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bh-blue);
    text-decoration: none;
    transition: color var(--bh-transition), gap var(--bh-transition);
}

.ww-bh-card__cta:hover {
    color: var(--bh-blue-light);
    gap: 7px;
}

.ww-bh-card__closed-badge {
    font-size: 11px;
    font-weight: 600;
    color: #b91c1c;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 3px;
}

/* ── Empty state ──────────────────────────────────────────────────────── */
.ww-bh-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--bh-gray-400);
    font-size: 15px;
    border: 2px dashed var(--bh-gray-200);
    border-radius: var(--bh-radius);
}

/* ── Load More ────────────────────────────────────────────────────────── */
.ww-bh-pagination {
    text-align: center;
    padding: 28px 0 8px;
}

/* Styling comes from ww-btn / ww-btn-pill — only override disabled state */
.ww-bh-load-more:disabled { opacity: .5; cursor: default; transform: none; }

/* ── Loading overlay ──────────────────────────────────────────────────── */
.ww-bh-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.8);
    border-radius: var(--bh-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--bh-gray-700);
    z-index: 10;
}

.ww-bh-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--bh-gray-200);
    border-top-color: var(--bh-blue);
    border-radius: 50%;
    animation: bh-spin .7s linear infinite;
}

@keyframes bh-spin { to { transform: rotate(360deg); } }

/* ── Single job page ──────────────────────────────────────────────────── */
.ww-bh-single-job {
    max-width: 860px;
    margin: 0 auto;
}

.ww-bh-single-job__header {
    border-bottom: 2px solid var(--bh-gray-200);
    padding-bottom: 24px;
    margin-bottom: 28px;
}

.ww-bh-single-job__company {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ww-bh-single-job__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bh-blue);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ww-bh-single-job__company-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--bh-blue);
}

.ww-bh-single-job__title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bh-gray-900);
    line-height: 1.2;
    margin: 0 0 14px;
}

.ww-bh-single-job__meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    font-size: 14px;
    color: var(--bh-gray-700);
    margin-bottom: 14px;
}

.ww-bh-single-job__meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ww-bh-single-job__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ww-bh-single-job__body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--bh-gray-700);
}

.ww-bh-single-job__body h2,
.ww-bh-single-job__body h3 { color: var(--bh-gray-900); margin-top: 1.5em; }

.ww-bh-single-job__body ul { padding-left: 1.5em; }
.ww-bh-single-job__body li { margin-bottom: .4em; }

.ww-bh-single-job__cta-box {
    background: var(--bh-blue-pale);
    border: 1px solid rgba(26, 77, 143, .2);
    border-radius: var(--bh-radius);
    padding: 24px;
    margin-top: 36px;
}

/* GF form inside CTA box: fully left-aligned */
.ww-bh-single-job__cta-box .gform_wrapper,
.ww-bh-single-job__cta-box .gform_wrapper * {
    text-align: left;
}

/* Confirmation message stays centered */
.ww-bh-single-job__cta-box .ww-bh-interest-confirm {
    text-align: center;
}

.ww-bh-apply-btn {
    display: inline-block;
    padding: 13px 36px;
    background: var(--bh-blue);
    color: #fff;
    border-radius: var(--bh-radius-sm);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: background var(--bh-transition);
}

.ww-bh-apply-btn:hover { background: var(--bh-blue-light); }

.ww-bh-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--bh-blue);
    text-decoration: none;
    margin-bottom: 24px;
}

.ww-bh-back-link:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ww-bh-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .ww-bh-grid           { grid-template-columns: 1fr; }
    .ww-bh-filter-row     { flex-direction: column; }
    .ww-bh-filter-group   { min-width: 100%; flex-basis: 100%; }
    .ww-bh-single-job__title { font-size: 1.5rem; }
}
