/**
 * Member Catalog & Map Styles
 *
 * @package CXQ\Membership
 * @since 2.8.2
 */

/* Container */
.cxq-member-catalog-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Filters */
.cxq-member-filters {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.cxq-filters-inner h3 {
    margin-top: 0;
    font-size: 20px;
    color: #2271b1;
    margin-bottom: 20px;
}

/* Category Pills */
.cxq-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.cxq-category-pill {
    background: #fff;
    border: 2px solid #2271b1;
    color: #2271b1;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cxq-category-pill:hover {
    background: #e7f0f7;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
}

.cxq-category-pill.active {
    background: #2271b1;
    color: #fff;
}

.cxq-category-pill.active:hover {
    background: #135e96;
}

/* Subcategory Pills */
.cxq-subcategory-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f6fb;
    border-radius: 8px;
    border: 1px solid #d0e3f2;
}

.cxq-subcategory-pill {
    background: #fff;
    border: 1px solid #7fb3d5;
    color: #2271b1;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cxq-subcategory-pill:hover {
    background: #d0e3f2;
    border-color: #2271b1;
}

.cxq-subcategory-pill.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.cxq-subcategory-pill.active:hover {
    background: #135e96;
}

.cxq-filter-group {
    margin-bottom: 15px;
}

.cxq-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #50575e;
}

.cxq-filter-group input[type="text"],
.cxq-filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
}

.cxq-filter-group input[type="range"] {
    width: 100%;
}

.cxq-filter-group .distance-value {
    display: inline-block;
    margin-left: 10px;
    font-weight: 600;
    color: #2271b1;
}

.cxq-filter-actions {
    margin-top: 20px;
}

.cxq-clear-filters {
    background: #fff;
    border: 1px solid #2271b1;
    color: #2271b1;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cxq-clear-filters:hover {
    background: #2271b1;
    color: #fff;
}

/* Map */
.cxq-member-map-wrapper {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.cxq-member-map {
    width: 100%;
    height: 400px;
}

.cxq-member-map img {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Info window */
.cxq-member-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.cxq-member-info h4 a {
    color: #2271b1;
    text-decoration: none;
}

.cxq-member-info h4 a:hover {
    text-decoration: underline;
}

.cxq-member-info p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #50575e;
}

.cxq-view-profile {
    display: inline-block;
    padding: 6px 12px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}

.cxq-view-profile:hover {
    background: #135e96;
    color: #fff;
}

/* Member List */
.cxq-member-list-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.cxq-member-count {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #50575e;
}

.cxq-member-count .count {
    color: #2271b1;
}

.cxq-member-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cxq-member-item {
    background: #f9f9f9;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cxq-member-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cxq-member-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    min-height: 200px;
    flex: 1;
    padding: 20px;
}

.cxq-member-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cxq-member-image img {
    max-width: 100%;
    max-height: 180px;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain;
}

.cxq-member-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #fff;
}

.cxq-member-item h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.cxq-member-item h3 a {
    color: #2271b1;
    text-decoration: none;
}

.cxq-member-item h3 a:hover {
    text-decoration: underline;
}

.cxq-member-intro {
    color: #2c3338;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.cxq-member-address {
    color: #50575e;
    font-size: 14px;
    margin: 0 0 12px 0;
}

.cxq-member-contact {
    background: #fff;
    padding: 12px;
    border-radius: 4px;
    margin: 0 0 12px 0;
}

.cxq-member-contact p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.cxq-member-contact p:last-child {
    margin-bottom: 0;
}

.cxq-member-contact a {
    color: #2271b1;
    text-decoration: none;
}

.cxq-member-contact a:hover {
    text-decoration: underline;
}

.cxq-member-link {
    display: inline-block;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    margin-top: auto;
}

.cxq-member-link:hover {
    background: #135e96;
    color: #fff;
}

.cxq-no-members {
    text-align: center;
    padding: 40px;
    color: #646970;
    font-size: 16px;
}

/* Pagination */
.cxq-member-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.cxq-member-pagination button {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #2271b1;
    color: #2271b1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cxq-member-pagination button:hover {
    background: #2271b1;
    color: #fff;
}

.cxq-member-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sidebar Widget Filters */
.cxq-catalog-sidebar-filters {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Attribute Filter Widget (WooCommerce-style) */
.cxq-attribute-filters {
    background: #fff;
    padding: 0;
}

.cxq-attribute-filter-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.cxq-attribute-filter-group:last-of-type {
    border-bottom: none;
}

.cxq-attribute-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cxq-attribute-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cxq-attribute-list li {
    margin: 0 0 8px 0;
    padding: 0;
}

/* Hierarchical Display */
.cxq-parent-category {
    margin-bottom: 15px !important;
}

.cxq-parent-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 8px;
    text-transform: none;
}

.cxq-child-list {
    list-style: none;
    margin: 0 0 0 15px;
    padding: 0;
}

.cxq-child-category {
    margin: 0 0 6px 0 !important;
    padding: 0;
}

.cxq-child-category label {
    font-size: 13px;
    padding: 2px 0;
}

.cxq-attribute-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #50575e;
    font-weight: normal;
    margin: 0;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.cxq-attribute-list label:hover {
    color: #2271b1;
}

.cxq-attribute-checkbox {
    margin: 0 8px 0 0 !important;
    cursor: pointer;
}

.cxq-attribute-label {
    flex: 1;
}

.cxq-attribute-count {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

.cxq-attribute-select {
    width: 100%;
    min-height: 100px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.cxq-attribute-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.cxq-apply-attributes,
.cxq-clear-attributes {
    flex: 1;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.cxq-apply-attributes {
    background: #2271b1;
    color: #fff;
}

.cxq-apply-attributes:hover {
    background: #135e96;
}

.cxq-clear-attributes {
    background: #f0f0f0;
    color: #333;
}

.cxq-clear-attributes:hover {
    background: #e0e0e0;
}

/* Active Filters Display */
.cxq-active-attributes {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.cxq-active-attributes h5 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cxq-active-attribute-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cxq-active-attribute-item {
    margin: 0;
    padding: 0;
}

.cxq-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #2271b1;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
}

.cxq-remove-attribute {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin: 0 0 0 4px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.cxq-remove-attribute:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cxq-sidebar-filter-group {
    margin-bottom: 15px;
}

.cxq-sidebar-filter-group:last-of-type {
    margin-bottom: 20px;
}

.cxq-sidebar-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #50575e;
    font-size: 14px;
}

.cxq-sidebar-filter-group input[type="text"],
.cxq-sidebar-filter-group select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 13px;
}

.cxq-sidebar-filter-group select[multiple] {
    min-height: 80px;
}

.cxq-sidebar-filter-group input[type="range"] {
    width: 100%;
    margin: 5px 0;
}

.cxq-sidebar-filter-group input[type="checkbox"] {
    margin-right: 8px;
}

.cxq-sidebar-filter-group .distance-value {
    display: block;
    margin-top: 5px;
    font-weight: 600;
    color: #2271b1;
    font-size: 13px;
    text-align: center;
}

.cxq-sidebar-filter-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.cxq-sidebar-clear-filters {
    width: 100%;
    background: #fff;
    border: 1px solid #2271b1;
    color: #2271b1;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.cxq-sidebar-clear-filters:hover {
    background: #2271b1;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .cxq-member-list {
        grid-template-columns: 1fr;
    }

    .cxq-member-filters {
        padding: 15px;
    }

    .cxq-member-map {
        height: 300px;
    }

    .cxq-category-pills {
        gap: 8px;
    }

    .cxq-category-pill {
        padding: 8px 16px;
        font-size: 13px;
    }

    .cxq-subcategory-pill {
        padding: 5px 12px;
        font-size: 12px;
    }

    .cxq-filters-inner h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .cxq-member-item {
        padding: 15px;
    }

    .cxq-member-item h3 {
        font-size: 16px;
    }
}
