/**
 * Property Filters Styles
 *
 * @package HomeProz
 */

// Archive Hero
.archive-hero {
    background-color: var(--color-bg-card);
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.archive-hero-title {
    margin-bottom: 0.5rem;
}

.archive-hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
    max-width: 600px;
}

// Filters Container
.property-filters {
    background-color: var(--color-bg-card);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filters-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;

    @media (min-width: 640px) {
        grid-template-columns: repeat(2, 1fr);
    }

    @media (min-width: 1024px) {
        grid-template-columns: repeat(3, 1fr) 2fr;
        gap: 1.25rem;
    }
}

// Filter Groups
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filter-select {
    width: 100%;
    padding: 0.625rem 2rem 0.625rem 0.75rem;
    background-color: var(--color-bg-dark);
    border: 1px solid var(--color-border);
    border-radius: 0.25rem;
    color: var(--color-text);
    font-size: 0.9375rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B0B0B0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;

    &:focus {
        outline: none;
        border-color: var(--color-accent);
    }
}

// Price Input Group
.filter-group-price {
    @media (min-width: 1024px) {
        grid-column: span 1;
    }
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    .filter-select {
        flex: 1;
        min-width: 0;
    }
}

.price-separator {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

// Filters Actions
.filters-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);

    @media (min-width: 768px) {
        flex-wrap: nowrap;
    }
}

.filter-group-sort {
    flex: 1;
    min-width: 150px;

    @media (min-width: 768px) {
        flex: 0 0 auto;
        width: 180px;
    }
}

.filters-submit,
.filters-reset {
    flex-shrink: 0;

    @media (max-width: 639px) {
        flex: 1;
    }
}

// Loading State
.property-filters.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

// Results loading spinner (only for first load)
.property-results-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;

    .spinner {
        width: 40px;
        height: 40px;
        border: 3px solid var(--color-border);
        border-top-color: var(--color-accent);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
