/* Widget Elementor "Smart Filter by Harry" — libs/area-filter.php */
.huong-af {
    --huong-af-accent: #0073e1;
    position: relative;
}

.huong-af__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px var(--huong-af-col-gap, 16px);
    padding: 16px;
    margin: 0 0 var(--huong-af-divider-space, 18px);
    background: #f7f8fa;
    border-radius: 8px;
}

.huong-af__field {
    display: flex;
    flex-direction: column;
    flex: 1 1 160px;
    min-width: 0;
}

.huong-af__field label {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.huong-af__field select {
    width: 100%;
    height: var(--huong-af-control-h, 44px);
    padding: 0 32px 0 12px;
    font-size: 15px;
    color: #222;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23555' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.huong-af__field select:focus {
    outline: none;
    border-color: var(--huong-af-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--huong-af-accent) 20%, transparent);
}

.huong-af__actions {
    display: flex;
    gap: 8px;
}

.huong-af__actions button {
    height: var(--huong-af-control-h, 44px);
    padding: 0 18px;
    font-size: 15px;
    border-radius: 6px;
    cursor: pointer;
}

.huong-af__submit {
    color: #fff;
    background: var(--huong-af-accent);
    border: 1px solid var(--huong-af-accent);
}

/* Có JS: lọc ngay khi đổi ô, không cần nút Search */
.huong-af.is-js .huong-af__submit {
    display: none;
}

.huong-af__reset {
    color: #444;
    background: #fff;
    border: 1px solid #d9dde3;
}

.huong-af__reset:hover {
    border-color: var(--huong-af-accent);
    color: var(--huong-af-accent);
}

/* Đường phân cách rất nhẹ giữa thanh lọc và danh sách */
.huong-af__divider {
    height: 0;
    margin: 0 0 var(--huong-af-divider-space, 18px);
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.huong-af__count {
    margin: 0 0 14px;
    font-size: 14px;
    color: #555;
}

.huong-af__results {
    transition: opacity 0.2s;
}

.huong-af.is-loading .huong-af__results {
    opacity: 0.45;
    pointer-events: none;
}

/* Thẻ căn của theme dùng class cột Bootstrap: để lưới quyết định số cột */
.huong-af__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.huong-af__grid > .listing_wrapper {
    width: auto;
    max-width: none;
    flex: none;
    padding: 0;
    margin: 0;
}

.huong-af__empty {
    padding: 32px 16px;
    text-align: center;
    color: #666;
}

.huong-af__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 24px 0 0;
}

.huong-af__pagination a,
.huong-af__pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border-radius: 6px;
    text-decoration: none;
}

.huong-af__pagination a {
    color: #333;
    border: 1px solid #d9dde3;
}

.huong-af__pagination a:hover {
    color: var(--huong-af-accent);
    border-color: var(--huong-af-accent);
}

.huong-af__pagination .is-current {
    color: #fff;
    background: var(--huong-af-accent);
}

/* Bố cục dọc (sidebar) */
.huong-af-layout-vertical .huong-af__bar {
    flex-direction: column;
    align-items: stretch;
}

.huong-af-layout-vertical .huong-af__field {
    flex: none;
}

.huong-af-layout-vertical .huong-af__actions button {
    flex: 1;
}

@media (max-width: 767px) {
    .huong-af__bar {
        padding: 12px;
    }

    .huong-af__field {
        flex-basis: calc(50% - 8px);
    }

    .huong-af__actions {
        flex-basis: 100%;
    }
}

/* Thẻ đơn giản (trình sửa Elementor / khi thẻ của theme lỗi) */
.huong-af__card a {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.huong-af__card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.huong-af__card-title {
    display: block;
    padding: 10px 12px 4px;
    font-weight: 600;
}

.huong-af__card-facts {
    display: block;
    padding: 0 12px 12px;
    font-size: 14px;
    color: #666;
}
