/* Filtros listagem — Fase 5 */

.pf-tab-btn {
    padding: 0.3125rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid hsl(var(--border));
    background: transparent;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pf-tab-btn:first-child {
    border-radius: 0.125rem 0 0 0.125rem;
}

.pf-tab-btn:last-child {
    border-radius: 0 0.125rem 0.125rem 0;
    border-left: 0;
}

.pf-tab-btn.pf-tab-active {
    background: hsl(var(--foreground));
    color: hsl(var(--background));
    border-color: hsl(var(--foreground));
}

.pf-filters-toggle {
    position: relative;
}

.pf-filters-toggle-icon {
    transition: transform 0.3s ease;
}

.pf-filters-toggle-icon.is-expanded {
    transform: rotate(180deg);
}

.pf-filters-panel {
    will-change: height;
}

@media (prefers-reduced-motion: reduce) {
    .pf-filters-panel {
        transition-duration: 0.01ms !important;
    }

    .pf-filters-toggle-icon {
        transition: none;
    }
}

.pf-filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
    background: hsl(var(--foreground));
    color: hsl(var(--background));
}

.pf-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.pf-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.125rem 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-family: inherit;
    color: hsl(var(--muted-foreground));
    background: hsl(var(--muted));
    border-radius: 9999px;
    white-space: nowrap;
}

.pf-active-chip-label {
    line-height: 1.25;
}

.pf-active-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pf-active-chip-remove:hover {
    background: hsl(var(--foreground) / 0.08);
    color: hsl(var(--foreground));
}

.pf-active-chip-remove:focus-visible {
    outline: 2px solid hsl(var(--foreground) / 0.35);
    outline-offset: 1px;
}

.pf-pill {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-family: inherit;
    border: 1px solid hsl(var(--border));
    border-radius: 0.125rem;
    color: hsl(var(--muted-foreground));
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pf-pill:hover {
    border-color: hsl(var(--foreground));
    color: hsl(var(--foreground));
}

.pf-pill.pf-pill-active {
    background: hsl(var(--foreground));
    color: hsl(var(--background));
    border-color: hsl(var(--foreground));
}

.pf-tipo-scroll {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.pf-tipo-scroll .pf-tipo-pill {
    flex: 0 0 auto;
}

@media (max-width: 767px) {
    .pf-tipo-scroll {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 0.25rem;
        margin-bottom: -0.25rem;
    }
}

[x-cloak] {
    display: none !important;
}

.property-search-dropdown--listing {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 60;
}

/* Toolbar listagem — busca em linha própria no mobile */
.pf-search-slot .property-search-embedded {
    width: 100%;
}

.property-search-bar--listing {
    position: relative;
}

@media (max-width: 639px) {
    .pf-toolbar {
        width: 100%;
    }

    .pf-search-slot .property-search-bar--listing {
        background: hsl(var(--background));
        border-color: hsl(var(--border));
        min-height: 2.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    .pf-search-slot .property-search-bar--listing:focus-within {
        border-color: hsl(var(--foreground) / 0.35);
        box-shadow: 0 0 0 2px hsl(var(--foreground) / 0.08);
    }

    .pf-search-slot .property-search-input {
        font-size: 1rem;
        padding-top: 0.6875rem;
        padding-bottom: 0.6875rem;
    }

    .pf-filters-toggle {
        min-height: 2.75rem;
    }
}
