/**
 * Polyweb Realty Filter - Styles
 */

.polyweb-realty-filter {
    --pwf-ink: #0f1d2d;
    --pwf-muted: #5a6b7b;
    --pwf-line: #d7e1ea;
    --pwf-surface: #ffffff;
    --pwf-accent: #0f62fe;
    --pwf-accent-2: #27b3a8;
    --pwf-shadow: 0 12px 30px rgba(15, 29, 45, 0.12);
    --pwf-soft-shadow: 0 4px 12px rgba(15, 29, 45, 0.08);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #f7fbff 0%, #ffffff 55%, #f4fbf8 100%);
    padding: 26px 28px;
    border-radius: 14px;
    border: 1px solid rgba(15, 29, 45, 0.08);
    box-shadow: var(--pwf-shadow);
    margin-bottom: 30px;
}

.polyweb-filter-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 22px;
    align-items: flex-end;
}

/* Horizontal Layout */
.polyweb-filter-horizontal .polyweb-filter-inner {
    flex-direction: row;
}

.polyweb-filter-horizontal .polyweb-filter-group {
    flex: 1 1 200px;
}

/* Vertical Layout */
.polyweb-filter-vertical .polyweb-filter-inner {
    flex-direction: column;
}

.polyweb-filter-vertical .polyweb-filter-group {
    width: 100%;
}

/* Filter Groups */
.polyweb-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.polyweb-filter-label {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pwf-muted);
    margin-bottom: 6px;
    display: block;
}

/* Select Inputs */
.polyweb-filter-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--pwf-line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    background-color: var(--pwf-surface);
    color: var(--pwf-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow: var(--pwf-soft-shadow);
}

.polyweb-filter-select:hover {
    border-color: rgba(15, 98, 254, 0.5);
    transform: translateY(-1px);
}

.polyweb-filter-select:focus {
    outline: none;
    border-color: var(--pwf-accent);
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.15);
}

/* Checkboxes */
.polyweb-filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.polyweb-filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--pwf-ink);
    user-select: none;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--pwf-line);
    background: #fff;
    transition: all 0.2s ease;
    box-shadow: var(--pwf-soft-shadow);
}

.polyweb-filter-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--pwf-accent);
}

.polyweb-filter-checkboxes label:hover {
    border-color: rgba(15, 98, 254, 0.4);
    transform: translateY(-1px);
}

.polyweb-filter-checkboxes input[type="checkbox"]:checked + span {
    color: var(--pwf-accent);
}

/* Price Filter */
.polyweb-filter-price .polyweb-price-inputs {
    display: flex;
    gap: 15px;
}

.polyweb-price-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.polyweb-price-input-wrapper label {
    font-size: 12px;
    color: var(--pwf-muted);
    font-weight: 600;
}

.polyweb-filter-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--pwf-line);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pwf-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: var(--pwf-soft-shadow);
}

.polyweb-filter-input:hover {
    border-color: rgba(15, 98, 254, 0.5);
    transform: translateY(-1px);
}

.polyweb-filter-input:focus {
    outline: none;
    border-color: var(--pwf-accent);
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.15);
}

/* Filter Actions */
.polyweb-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.polyweb-filter-apply,
.polyweb-filter-reset {
    padding: 12px 22px;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.polyweb-filter-apply {
    background: linear-gradient(135deg, var(--pwf-accent) 0%, #2b7bff 55%, var(--pwf-accent-2) 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 98, 254, 0.2);
}

.polyweb-filter-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(15, 98, 254, 0.28);
}

.polyweb-filter-apply:active {
    transform: translateY(0);
}

.polyweb-filter-reset {
    background-color: #ffffff;
    color: var(--pwf-muted);
    border: 1px solid var(--pwf-line);
    box-shadow: var(--pwf-soft-shadow);
}

.polyweb-filter-reset:hover {
    background-color: #f3f6fb;
    border-color: rgba(15, 98, 254, 0.3);
    color: var(--pwf-ink);
}

/* Results Count */
.polyweb-filter-results-count {
    width: 100%;
    padding: 12px 14px;
    background: rgba(15, 98, 254, 0.08);
    border-left: 4px solid var(--pwf-accent);
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: var(--pwf-soft-shadow);
}

.polyweb-filter-results-count .results-text {
    font-size: 14px;
    color: var(--pwf-ink);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .polyweb-realty-filter {
        padding: 20px;
        border-radius: 12px;
    }
    
    .polyweb-filter-inner {
        gap: 15px;
    }
    
    .polyweb-filter-horizontal .polyweb-filter-inner {
        flex-direction: column;
    }
    
    .polyweb-filter-horizontal .polyweb-filter-group {
        width: 100%;
    }
    
    .polyweb-filter-checkboxes {
        flex-direction: column;
        gap: 8px;
    }
    
    .polyweb-filter-actions {
        width: 100%;
    }
    
    .polyweb-filter-apply,
    .polyweb-filter-reset {
        flex: 1;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .polyweb-price-inputs {
        flex-direction: column;
    }
    
    .polyweb-filter-actions {
        flex-direction: column;
    }
    
    .polyweb-filter-apply,
    .polyweb-filter-reset {
        width: 100%;
    }
}

/* Animation for filtered cards */
.realitni-podil-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.realitni-podil-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}
