/* Tag Pills Styling */
.tags-filter-wrapper {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.tags-filter-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.tag-pill:hover {
    color: #212529;
    background-color: #e9ecef;
    border-color: #ced4da;
    text-decoration: none;
    outline: none;
}

.tag-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.tag-pill.active {
    color: #ffffff !important;
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.tag-pill .tag-count {
    margin-left: 6px;
    font-size: 11px;
    opacity: 0.7;
}

.tag-pill.active .tag-count {
    color: #ffffff;
    opacity: 0.9;
}

/* More filters button */
.tag-more-btn {
    font-size: 14px;
    font-weight: 600;
    color: #007bff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.15s ease-in-out;
    outline: none;
}

.tag-more-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

.tag-more-btn:focus {
    outline: none;
}

/* Animation classes for smooth expand */
.more-tag {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.more-tag.collapsing-tag {
    opacity: 0;
    transform: scale(0.9);
}

.more-tag.expanded-tag {
    opacity: 1;
    transform: scale(1);
}

/* Filter Loader Styling */
.filter-loader-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    width: 100%;
}

.filter-loader {
    width: 48px;
    height: 48px;
    border: 5px solid #f3f3f3;
    border-bottom-color: #007bff;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Custom Tree Select Styles */
.custom-tree-select {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.custom-select-trigger {
    background-color: #ffffff38;
    color: #fff;
    padding: 10px 29px 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m7 10l5 5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center right 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.custom-select-trigger:hover {
    background-color: #ffffff4d;
    border-color: #c6a348;
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    color: #0f1e3a;
    z-index: 1000;
    display: none;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-top: 3px solid #c6a348;
}

.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: #c6a348;
    border-radius: 3px;
}

.custom-select-options ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-select-options>ul>li {
    border-bottom: 1px solid #f0f0f0;
}

.custom-select-options>ul>li:last-child {
    border-bottom: none;
}

.custom-select-options .option-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.custom-select-options .option-row:hover {
    background-color: #f9f9f9;
}

.custom-select-options .option-row.selected {
    background-color: #0f1e3a;
    color: #fff;
}

.custom-select-options .option-row.selected .option-label {
    color: #fff;
    font-weight: 600;
}

.custom-select-options .option-row.selected .expand-btn {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.custom-select-options .option-label {
    flex-grow: 1;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.2s;
}

.custom-select-options .option-row:not(.selected) .option-label:hover {
    color: #c6a348;
}

.custom-select-options .expand-btn {
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-right: 12px;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    color: #666;
    transition: all 0.2s;
}

.custom-select-options .expand-btn:hover {
    background: #c6a348;
    border-color: #c6a348;
    color: #fff;
}

.custom-select-options .expand-placeholder {
    width: 22px;
    height: 22px;
    display: inline-block;
    margin-right: 12px;
}

.custom-select-options .sub-options {
    padding-left: 24px;
    background: #fdfdfd;
    border-top: 1px solid #f5f5f5;
}

.custom-select-options .sub-options .option-row {
    padding: 8px 16px;
    font-size: 13.5px;
}

.custom-select-options .sub-options .sub-options {
    background: #fafafa;
    border-left: 1px solid #eee;
    margin-left: 10px;
    padding-left: 14px;
}