/**
 * G7 Experts Directory Styles (Directory Style)
 * Additional styles for the experts directory page
 */

/* Page Header */
.experts-directory-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 20px 10px;
}

.experts-directory-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.experts-directory-header p {
    font-size: 1.1em;
    color: #666;
}

/* Name Search Input */
.name-search {
    display: flex;
    flex-direction: column;
}

.name-search label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9em;
}

.name-search .search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95em;
    width: 200px;
}

/* Letter Navigation Container */
.letter-navigation-container {
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.letter-navigation-container .inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

/* Letter Filter Buttons */
.letter-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.letter-btn {
    padding: 6px 10px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 32px;
    text-align: center;
}

.letter-btn:hover {
    background: #f0f0f0;
    border-color: #aaa;
}

.letter-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Sidebar Filter Box */
.filters .filter-box {
    padding: 0 20px;
}
.sidebar .filter-box {
    background: #fff;
}

.sidebar .filter-box .filters-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .filter-box .filters-list > li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.sidebar .filter-box .filters-list > li:last-child {
    border-bottom: none;
}

.sidebar .filter-box h4 {
    margin: 0 0 15px 0;
    font-size: 1em;
    font-weight: 600;
    color: #333;
}

.filter-checkboxes {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Filter Items (matching company directory) */
.filter-item {
    margin-bottom: 8px;
}

.filter-item input[type="checkbox"] {
    display: none;
}

/* Custom checkbox label (matching company directory) */
.custom-checkbox {
    display: inline-block;
    padding-left: 30px;
    position: relative;
    cursor: pointer;
    font-size: 0.9em;
    color: #555;
    line-height: 1.6;
}

/* Custom checkbox image */
.custom-checkbox::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: url('/wp-content/themes/directories/js/jstree/32px.png');
    background-repeat: no-repeat;
    background-position: -167px -8px;
}

/* Checked state */
input[type="checkbox"]:checked + .custom-checkbox::before {
    background: url('/wp-content/themes/directories/js/jstree/32px.png');
    background-position: -230px -8px;
    background-repeat: no-repeat;
}


/* Expert Cards - Additional Styles */
.listing ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.listing ul li {
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #555;
}

.listing .distance {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.9em;
    color: #555;
}

/* Show Email Link */
.show-email-link {
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.show-email-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Location Status */
#experts-location-status {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.1em;
    color: #666;
}

/* Pagination - Matching company directory style */
.paginationjs {
    display: flex;
    line-height: 3;
    font-size: 24px;
    box-sizing: initial;
    /* justify-content: center; */
    margin-top: 30px;
    padding-top: 20px;
    /* border-top: 1px solid #ddd; */
}

.paginationjs:after {
    display: table;
    content: " ";
    clear: both;
}

.paginationjs .paginationjs-pages {
    float: left;
    margin-left: 10px;
}

.paginationjs .paginationjs-pages ul {
    float: left;
    margin: 0;
    padding: 0;
}

.paginationjs .paginationjs-pages li {
    display: inline-block;
    list-style: none;
}

.paginationjs .paginationjs-pages li > a {
    border: 1px solid #000;
    border-radius: 5px;
    padding: 15px 22px;
    text-decoration: none;
    margin: 0 10px 0 0;
    cursor: pointer;
}

.paginationjs .paginationjs-pages li:not(.disabled) > a:hover {
    border-color: #00A2D1;
    color: #00A2D1;
}

.paginationjs .paginationjs-pages li.active {
    border: none;
}

.paginationjs .paginationjs-pages li.active > a {
    border-width: 2px;
    border-color: #000;
    color: #000;
    font-weight: bold;
}

.paginationjs .paginationjs-pages li.disabled > a {
    opacity: 0.3;
    cursor: default;
}

.paginationjs .paginationjs-pages li.disabled > a:hover {
    background: none;
}

.paginationjs .disabled,
.paginationjs .disabled a {
    pointer-events: none;
    cursor: default;
}

.paginationjs > :first-child {
    margin-left: 0;
}

/* Map Info Window */
.map-info-window h4 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
}

.map-info-window p {
    margin: 5px 0;
    font-size: 0.9em;
}

.user-avatar div img {
    border-radius: 50%;
    width: 100%;
    max-width: 80px;
    height: 80px;
    object-fit: cover;
    opacity: 0.2;
}

/* Location Filters (Country/State dropdowns) */
.location-filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.location-filters .filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.location-filters .filter-field label {
    font-size: 0.85em;
    font-weight: 500;
    color: #555;
}

.experts-select-filter {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    background-color: #fff;
    cursor: pointer;
}

.experts-select-filter:focus {
    outline: none;
    border-color: #0073aa;
}

.experts-select-filter:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #999;
}

input.experts-select-filter {
    cursor: text;
}

input.experts-select-filter::placeholder {
    color: #999;
}

/* Responsive Adjustments */
@media (max-width: 850px) {
    .letter-filter {
        gap: 3px;
    }

    .letter-btn {
        padding: 5px 8px;
        font-size: 0.85em;
        min-width: 28px;
    }

    .filter-actions {
        flex-direction: column;
    }
}
