/* WOX Members Directory - InstantSearch UI styles
 * Matches Astra + worldopex-child theme aesthetic
 * Brand: #eda82c (gold), #16355f (navy), #00b0f0 (cyan), #ffffff (white)
 */

#wox-search-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: inherit;
}

/* ============================================================
 * Main search box - icon properly centered inside left padding
 * ============================================================ */
#wox-searchbox {
    margin-bottom: 24px;
}
#wox-searchbox .ais-SearchBox-form {
    position: relative;
    display: block;
}
#wox-searchbox .ais-SearchBox-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 44px 14px 44px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.4;
    margin: 0;
}
#wox-searchbox .ais-SearchBox-input:focus {
    outline: none;
    border-color: #eda82c;
    box-shadow: 0 0 0 3px rgba(237, 168, 44, 0.15);
}
#wox-searchbox .ais-SearchBox-submit,
#wox-searchbox .ais-SearchBox-reset {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}
#wox-searchbox .ais-SearchBox-submit { left: 10px; }
#wox-searchbox .ais-SearchBox-reset  { right: 10px; }
#wox-searchbox .ais-SearchBox-submitIcon,
#wox-searchbox .ais-SearchBox-resetIcon {
    width: 16px;
    height: 16px;
    fill: #6b7280;
    display: block;
}
#wox-searchbox .ais-SearchBox-loadingIndicator {
    position: absolute;
    right: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}











/* Grid layout: facets on left, results on right */
.wox-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 768px) {
    .wox-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    #wox-facets {
        order: 2;
        padding: 14px 16px;
    }
    /* Tighter card grid on mobile so cards do not touch viewport edges */
    .ais-Hits-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .wox-card-name { font-size: 14px; }
}
@media (max-width: 480px) {
    .ais-Hits-list {
        grid-template-columns: 1fr !important;
    }
}

/* Facets sidebar */
#wox-facets {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    position: sticky;
    top: 20px;
}
#wox-facets h3 {
    margin: 0 0 14px 0;
    font-size: 16px;
    color: #16355f;
    font-weight: 700;
}
.wox-facet {
    margin-bottom: 18px;
}
.wox-facet h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    font-weight: 600;
}







#wox-clear-refinements {
    margin-top: 18px;
}
.ais-ClearRefinements-button {
    width: 100%;
    background: transparent;
    border: 1px solid #6b7280;
    color: #6b7280;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.ais-ClearRefinements-button:hover:not(:disabled) {
    background: #16355f;
    color: #fff;
    border-color: #16355f;
}
.ais-ClearRefinements-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stats */
#wox-stats {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Results grid */
.ais-Hits-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.ais-Hits-item {
    padding: 0 !important;  /* Astra may force padding on li */
    border: 0 !important;
}

/* Member cards */
.wox-card {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.wox-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22, 53, 95, 0.08);
    border-color: #eda82c;
}
.wox-card-photo {
    width: 130px;
    height: 130px;
    margin: 18px auto 0;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(22, 53, 95, 0.08);
}
.wox-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wox-headshot-placeholder {
    font-size: 48px;
    font-weight: 700;
    color: #16355f;
    background: #eef2f7;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wox-card-body {
    padding: 14px 16px 16px;
    text-align: center;
}
.wox-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #16355f;
    margin: 8px 0 4px 0;
    line-height: 1.15;
}
.wox-card-role {
    font-size: 12px;
    color: #eda82c;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 2px 0;
}
.wox-card-company {
    font-size: 12px;
    color: #374151;
    margin: 2px 0;
}
.wox-card-country {
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
}

/* Empty state */
.wox-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 10px;
    font-size: 14px;
}

/* Pagination */
#wox-pagination {
    margin-top: 32px;
}
.ais-Pagination-list {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.ais-Pagination-item {
    list-style: none;
}
.ais-Pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    color: #374151;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all 0.15s ease;
}
.ais-Pagination-link:hover {
    background: #f3f4f6;
    border-color: #16355f;
}
.ais-Pagination-item--selected .ais-Pagination-link {
    background: #16355f;
    color: #fff;
    border-color: #16355f;
}
.ais-Pagination-item--disabled .ais-Pagination-link {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ============================================================
 * Pill-style facets - replaces default checkbox list.
 * Allows long labels to wrap inside the chip so nothing overflows
 * the sidebar. More compact than vertical checkbox lists.
 * ============================================================ */
#wox-facets .ais-RefinementList,
#wox-facets .ais-RefinementList-list {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    background: transparent !important;
}
#wox-facets .ais-RefinementList-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: flex-start;
    align-content: flex-start;
    line-height: 0;
}
#wox-facets .ais-RefinementList-item {
    margin: 0 3px 3px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: transparent !important;
    max-width: 100%;
    min-width: 0;
    display: inline-flex;
}
#wox-facets .ais-RefinementList-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    background: #f1f5f9;
    color: #374151;
    border-radius: 10px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border: 1px solid #e5e7eb;
    /* Important: allow wrap of long labels inside the chip, no overflow */
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}
#wox-facets .ais-RefinementList-label:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}
#wox-facets .ais-RefinementList-item--selected .ais-RefinementList-label {
    background: #16355f;
    color: #fff;
    border-color: #16355f;
}
#wox-facets .ais-RefinementList-item--selected .ais-RefinementList-label:hover {
    background: #0e2545;
}
#wox-facets .ais-RefinementList-checkbox {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
}
#wox-facets .ais-RefinementList-labelText {
    display: inline-block;
    min-width: 0;
}
#wox-facets .ais-RefinementList-count {
    flex-shrink: 0;
    font-size: 8px;
    background: rgba(0, 0, 0, 0.06);
    padding: 0 4px;
    border-radius: 6px;
    font-weight: 600;
}
#wox-facets .ais-RefinementList-item--selected .ais-RefinementList-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
#wox-facets .ais-RefinementList-showMore {
    margin-top: 8px;
    background: transparent;
    border: 0;
    color: #00b0f0;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 0;
    text-decoration: underline;
}
#wox-facets .ais-RefinementList-showMore:hover { color: #16355f; }
#wox-facets .ais-RefinementList-searchBox {
    margin-bottom: 8px;
}
#wox-facets .ais-RefinementList-searchBox 
/* Reset any Astra/Spectra default UL spacing inside facets */
#wox-facets ul,
#wox-facets ol {
    list-style: none !important;
    padding-inline-start: 0 !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
#wox-facets li::before {
    content: none !important;
}


/* Astra page-builder template pads .ast-container - we need the hero
 * to break OUT to viewport edges AND start at viewport top */
.ast-page-builder-template .entry-content > #wox-search-shell .wox-page-hero,
.ast-page-builder-template .entry-content > .wox-resources-shell .wox-page-hero {
    position: relative;
    margin-top: 0 !important;
}
/* Also reset article + content top spacing on these pages */
.ast-page-builder-template .site-content > .ast-container,
.ast-page-builder-template article.ast-article-single,
.ast-page-builder-template .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* Pull the hero up to overlap any residual margin so the navy is seamless */
body.page-id-869 .wox-page-hero,
body.page-id-950 .wox-page-hero {
    margin-top: 0 !important;
}
/* Below the hero, the rest of the page content needs WHITE background again */
body.page-id-869 .entry-content > #wox-search-shell,
body.page-id-950 .entry-content > .wox-resources-shell {
    background: #ffffff;
    padding-bottom: 60px;
}

/* ============================================================
 * Single-member page (/member/{slug}/) - moved from inline PHP
 * so WP Rockets RUCSS doesnt strip it.
 * ============================================================ */
.wox-member-hero {
    background: #16355f;
    color: #fff;
    padding: 180px 5% 70px 5%;
    text-align: center;
}
.wox-member-hero .wox-profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 4px solid #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.wox-member-hero .wox-profile-photo img { object-fit: cover; width: 100%; height: 100%; }
.wox-member-hero .wox-profile-photo-letter { font-size: 80px; font-weight: 700; color: #16355f; }
.wox-member-hero .wox-profile-name { font-size: 36px; font-weight: 700; margin: 0 0 8px 0; color: #fff; line-height: 1.15; }
.wox-member-hero .wox-profile-role { font-size: 17px; color: #eda82c; font-weight: 600; margin: 0 0 4px 0; }
.wox-member-hero .wox-profile-company { font-size: 15px; color: rgba(255,255,255,0.92); margin: 0 0 18px 0; }
.wox-member-hero .wox-profile-meta { display: inline-flex; gap: 22px; flex-wrap: wrap; justify-content: center; font-size: 14px; color: rgba(255,255,255,0.9); }
.wox-member-hero .wox-profile-meta a { color: #fff; text-decoration: none; }
.wox-member-hero .wox-profile-meta a:hover { color: #eda82c; }
.wox-member-hero .wox-profile-meta i { margin-right: 5px; }
.wox-member-body { max-width: 880px; margin: 40px auto 60px; padding: 0 20px; }
.wox-member-body .wox-profile-back { display: inline-flex; align-items: center; gap: 6px; color: #6b7280; text-decoration: none; font-size: 13px; margin-bottom: 24px; }
.wox-member-body .wox-profile-back:hover { color: #16355f; }
.wox-member-body .wox-profile-section { margin-bottom: 30px; }
.wox-member-body .wox-profile-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #6b7280; margin: 0 0 12px 0; }
.wox-member-body .wox-profile-section-body { font-size: 15px; line-height: 1.7; color: #374151; }
.wox-member-body .wox-profile-summary { font-size: 17px; line-height: 1.6; color: #16355f; font-style: italic; padding: 16px 20px; background: #f9fafb; border-left: 4px solid #eda82c; border-radius: 6px; margin: 0; }
.wox-tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.wox-tag { display: inline-block; background: #eef2f7; color: #16355f; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.wox-tag.exp { background: #fef3c7; color: #92400e; }
@media (max-width: 640px) {
    .wox-member-hero { padding: 130px 5% 50px 5%; }
    .wox-member-hero .wox-profile-photo { width: 140px; height: 140px; }
    .wox-member-hero .wox-profile-name { font-size: 28px; }
}

/* ============================================================
 * Mobile fix: prevent horizontal scroll caused by alignfull hero
 * (its 100vw width exceeds the body content area when a vertical
 * scrollbar is present, pushing card layout off-center on phones).
 * Applied at html AND body level - iOS Safari sometimes ignores
 * overflow-x on body alone.
 * ============================================================ */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
body.page-id-869,
body.page-id-950,
body.page-id-951 {
    overflow-x: hidden !important;
}

/* ============================================================
 * Mobile centering fix - force cards container to be centered
 * regardless of any parent asymmetric padding.
 * ============================================================ */
@media (max-width: 768px) {
    #wox-search-shell,
    #wox-search-shell .wox-grid,
    #wox-search-shell .wox-grid > main,
    #wox-search-shell #wox-hits,
    #wox-search-shell .ais-Hits-list {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Ensure card grid columns are equal width */
    #wox-search-shell .ais-Hits-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 !important;
        justify-content: center;
    }
    /* And the cards themselves dont have weird margin */
    #wox-search-shell .wox-card {
        margin: 0 !important;
        width: 100%;
        max-width: 100%;
    }
}
@media (max-width: 480px) {
    #wox-search-shell .ais-Hits-list {
        grid-template-columns: 1fr !important;
    }
}

