/* WP Property Sync - Frontend Filter Styles */

.wpps-filter-container {
    background: linear-gradient(135deg, #b8860b 0%, #8b6914 100%);
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
}

.wpps-filter-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
}

.wpps-filter-close:hover {
    color: #000;
}

.wpps-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.wpps-filter-group {
    display: flex;
    flex-direction: column;
}

.wpps-filter-group label {
    color: #fff;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.wpps-filter-group select,
.wpps-filter-group input[type="text"],
.wpps-filter-group input[type="number"] {
    padding: 10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.9);
    font-size: 14px;
    transition: all 0.3s;
}

.wpps-filter-group select:focus,
.wpps-filter-group input:focus {
    outline: none;
    border-color: #fff;
    background: #fff;
}

.wpps-filter-minmax {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wpps-filter-minmax input {
    width: 100%;
}

.wpps-filter-minmax input::placeholder {
    color: #999;
}

.wpps-filter-counter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpps-filter-counter button {
    width: 35px;
    height: 35px;
    border: 2px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.wpps-filter-counter button:hover {
    background: rgba(255,255,255,0.3);
    border-color: #fff;
}

.wpps-filter-counter input {
    width: 80px;
    text-align: center;
}

.wpps-characteristics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.wpps-characteristic-tag {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.wpps-characteristic-tag:hover {
    background: rgba(255,255,255,0.3);
    border-color: #fff;
}

.wpps-characteristic-tag.active {
    background: #fff;
    color: #b8860b;
    border-color: #fff;
}

.wpps-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    margin-top: 10px;
}

.wpps-filter-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.wpps-filter-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.wpps-btn {
    padding: 12px 30px;
    border: 2px solid #fff;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.wpps-btn-primary {
    background: #fff;
    color: #b8860b;
}

.wpps-btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.wpps-btn-secondary {
    background: transparent;
    color: #fff;
}

.wpps-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .wpps-filter-row {
        grid-template-columns: 1fr;
    }

    .wpps-filter-actions {
        flex-direction: column;
    }

    .wpps-btn {
        width: 100%;
    }
}

/* Loading spinner */
.wpps-loading {
    text-align: center;
    padding: 40px;
    color: #fff;
}

.wpps-spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wpps-count-loading {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.wpps-count-loading-text {
    color: #6b7280;
    font-size: 0.95em;
    font-weight: 500;
}

.wpps-count-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: wppsCountShimmer 1.2s infinite;
}

@keyframes wppsCountShimmer {
    0% { left: -150%; }
    100% { left: 150%; }
}

.wpps-results-container.wpps-initial-results-loading [data-wpps-hook="items"] {
    visibility: hidden;
}

.wpps-initial-loader {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.wpps-initial-loader .wpps-spinner {
    border-color: rgba(93, 148, 165, 0.25);
    border-top-color: #5d94a5;
}

.wpps-initial-loader-text {
    margin: 0;
    color: #6b7280;
    font-weight: 500;
}

body.wpps-page-loading {
    overflow: hidden;
}

.wpps-page-entry-loader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: rgba(93, 148, 165, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.wpps-page-entry-loader.is-ready {
    opacity: 0;
    visibility: hidden;
}

.wpps-page-loader-content {
    text-align: center;
    padding: 24px;
}

.wpps-page-loader-logo {
    width: clamp(140px, 22vw, 240px);
    height: auto;
    filter: brightness(0) invert(1);
    animation: wppsLogoPulse 1.7s ease-in-out infinite;
    transform-origin: center;
}

.wpps-page-loader-brand {
    color: #ffffff;
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: 0.16em;
    font-weight: 600;
    animation: wppsLogoPulse 1.7s ease-in-out infinite;
}

.wpps-page-loader-line {
    width: clamp(140px, 22vw, 240px);
    height: 3px;
    margin: 18px auto 0;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.22);
    position: relative;
}

.wpps-page-loader-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -45%;
    width: 40%;
    height: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    animation: wppsLineRun 1s ease-in-out infinite;
}

@keyframes wppsLogoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.88;
    }
    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

@keyframes wppsLineRun {
    0% {
        left: -45%;
    }
    100% {
        left: 105%;
    }
}