
/**
 * Havenlytics Preloader System v2.2.0
 * Complete - No Duplicates
 */

/* ============================================
   ANIMATIONS
   ============================================ */

/* Shimmer Animation */
@keyframes hvnly-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.hvnly-shimmer {
    background: linear-gradient(90deg, #e8e8e8 0%, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%, #e8e8e8 100%);
    background-size: 200% 100%;
    animation: hvnly-shimmer 1.2s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes hvnly-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.hvnly-pulse {
    background: #e8e8e8;
    animation: hvnly-pulse 1.2s ease-in-out infinite;
}

/* Wave Animation */
@keyframes hvnly-wave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hvnly-wave {
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
}

.hvnly-wave::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: hvnly-wave 1.2s ease-in-out infinite;
}

/* Bounce Animation */
@keyframes hvnly-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.hvnly-bounce {
    background: #e8e8e8;
    animation: hvnly-bounce 0.8s ease-in-out infinite;
}

/* Fade Animation */
@keyframes hvnly-fade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.hvnly-fade {
    background: #e8e8e8;
    animation: hvnly-fade 1.5s ease-in-out infinite;
}

/* Slide Animation */
@keyframes hvnly-slide {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

.hvnly-slide {
    background: linear-gradient(90deg, transparent 0%, #e8e8e8 50%, transparent 100%);
    background-size: 200% 100%;
    animation: hvnly-slide 1.8s ease-in-out infinite;
}

/* Glow Animation */
@keyframes hvnly-glow {
    0%, 100% { box-shadow: inset 0 0 20px rgba(108, 96, 254, 0.1); background: #e8e8e8; }
    50% { box-shadow: inset 0 0 40px rgba(108, 96, 254, 0.2); background: #f0f0f0; }
}

.hvnly-glow {
    background: #e8e8e8;
    animation: hvnly-glow 2s ease-in-out infinite;
}

/* Skeleton Loading */
@keyframes hvnly-skeleton {
    0% { opacity: 0.5; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(0.98); }
}

.hvnly-skeleton {
    background: #e8e8e8;
    animation: hvnly-skeleton 2s ease-in-out infinite;
}

/* Gradient Flow */
@keyframes hvnly-gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hvnly-gradient-flow {
    background: linear-gradient(270deg, #e8e8e8, #f0f0f0, #e0e0e0, #f5f5f5);
    background-size: 400% 400%;
    animation: hvnly-gradient-flow 3s ease-in-out infinite;
}

/* Breathing Effect */
@keyframes hvnly-breathing {
    0%, 100% { opacity: 0.4; transform: scale(0.97); }
    50% { opacity: 0.9; transform: scale(1); }
}

.hvnly-breathing {
    background: #e8e8e8;
    animation: hvnly-breathing 2.5s ease-in-out infinite;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .hvnly-shimmer,
    .hvnly-pulse,
    .hvnly-wave,
    .hvnly-bounce,
    .hvnly-fade,
    .hvnly-slide,
    .hvnly-glow,
    .hvnly-skeleton,
    .hvnly-gradient-flow,
    .hvnly-breathing {
        animation: none;
        background: #e8e8e8;
    }
}

/* ============================================
   FILTER SIDEBAR PRELOADER
   ============================================ */

.hvnly-filter-sidebar-preloader {
    background: var(--hvnly-card-bg, #ffffff);
    border-radius: var(--hvnly-card-radius, 8px);
    padding: 1.25rem;
    box-shadow: var(--hvnly-card-shadow, 0 2px 8px rgba(0,0,0,0.08));
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

/* Filter Header */
.hvnly-preloader-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--hvnly-border-color, #e4e4ed);
}

.hvnly-preloader-filter-title {
    width: 80px;
    height: 24px;
    border-radius: 4px;
}

.hvnly-preloader-filter-clear {
    width: 70px;
    height: 20px;
    border-radius: 4px;
}

/* Preloader Tabs */
.hvnly-preloader-tab {
    margin-bottom: 0;
    border-bottom: 1px solid var(--hvnly-border-color, #e4e4ed);
}

.hvnly-preloader-tab:last-child {
    border-bottom: none;
}

.hvnly-preloader-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    cursor: default;
}

.hvnly-preloader-tab-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hvnly-preloader-tab-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.hvnly-preloader-tab-title {
    width: 110px;
    height: 18px;
    border-radius: 4px;
}

.hvnly-preloader-tab-chevron {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.hvnly-preloader-tab-content {
    padding-bottom: 1rem;
    margin-top: 0.5rem;
}

/* Range Group */
.hvnly-preloader-range-group {
    display: flex;
    gap: 1rem;
}

.hvnly-preloader-range-item {
    flex: 1;
}

.hvnly-preloader-range-label {
    width: 50px;
    height: 14px;
    margin-bottom: 8px;
    border-radius: 3px;
}

.hvnly-preloader-range-select {
    height: 42px;
    width: 100%;
    border-radius: 6px;
}

/* Checkbox Group */
.hvnly-preloader-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hvnly-preloader-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hvnly-preloader-checkbox-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
}

.hvnly-preloader-checkbox-text {
    width: 100px;
    height: 16px;
    border-radius: 3px;
}

/* Two Column */
.hvnly-preloader-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Field */
.hvnly-preloader-field {
    margin-bottom: 0;
}

.hvnly-preloader-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.hvnly-preloader-field-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hvnly-preloader-field-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.hvnly-preloader-field-label {
    width: 90px;
    height: 16px;
    border-radius: 3px;
}

.hvnly-preloader-field-badge {
    width: 30px;
    height: 16px;
    border-radius: 8px;
}

.hvnly-preloader-field-actions {
    display: flex;
    gap: 6px;
}

.hvnly-preloader-field-action {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.hvnly-preloader-field-input {
    height: 42px;
    width: 100%;
    border-radius: 6px;
}

/* ============================================
   PROPERTY GRID PRELOADER
   ============================================ */

.hvnly-preloader-wrapper {
    display: block;
    width: 100%;
}

.hvnly-property-grid-preloader {
    display: none;
}

.hvnly-preloader-wrapper .hvnly-property-grid-preloader {
    display: grid !important;
}

.hvnly-property-grid-preloader.hvnly-grid-view {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 1.5rem;
}

/* List View Preloader */
.hvnly-property-grid-preloader.hvnly-list-view {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 1.5rem;
}

.hvnly-property-grid-preloader.hvnly-list-view .hvnly-property-card-preloader {
    display: flex;
    flex-direction: row;
}

.hvnly-property-grid-preloader.hvnly-list-view .hvnly-property-card-preloader .hvnly-property-grid-list-thumb {
    width: 450px;
    height: auto;
    flex-shrink: 0;
    min-height: 200px;
}

.hvnly-property-grid-preloader.hvnly-list-view .hvnly-property-card-preloader .hvnly-preloader-thumbnail {
    height: 100%;
    min-height: 200px;
}

.hvnly-property-grid-preloader.hvnly-list-view .hvnly-property-card-preloader .hvnly-property--grid-list--single__content {
    flex: 1;
}

/* ============================================
   PROPERTY CARD PRELOADER
   ============================================ */

.hvnly-property-card-preloader {
    background: var(--hvnly-card-bg, #ffffff);
    border-radius: var(--hvnly-card-radius, 8px);
    overflow: hidden;
    box-shadow: var(--hvnly-card-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.hvnly-preloader-thumbnail {
    height: 240px;
}

.hvnly-property-card-preloader .hvnly-property--grid-list--features {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--hvnly-border-color, #e4e4ed);
    border-bottom: 1px solid var(--hvnly-border-color, #e4e4ed);
    gap: 1rem;
}

.hvnly-property-card-preloader .hvnly-property--grid-list--feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.hvnly-preloader-feature-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.hvnly-preloader-feature-number {
    width: 25px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.hvnly-preloader-feature-label {
    width: 35px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
    margin-left: 4px;
}

.hvnly-property-card-preloader .hvnly-property--grid-list--footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--hvnly-border-color, #e4e4ed);
}

/* Shared Skeleton Sizes */
.hvnly-preloader-title {
    height: 24px;
    width: 85%;
    margin-bottom: 8px;
    border-radius: 4px;
}

.hvnly-preloader-location {
    height: 18px;
    width: 60%;
    border-radius: 4px;
}

.hvnly-preloader-excerpt {
    height: 50px;
    width: 100%;
    margin: 12px 0;
    border-radius: 4px;
}

.hvnly-preloader-button {
    width: 110px;
    height: 38px;
    border-radius: 4px;
}

.hvnly-preloader-views {
    width: 60px;
    height: 32px;
    border-radius: 4px;
}

.hvnly-preloader-badge {
    width: 70px;
    height: 26px;
    border-radius: 20px;
}

.hvnly-preloader-price {
    width: 110px;
    height: 36px;
    border-radius: 4px;
}

.hvnly-preloader-icon-circle,
.hvnly-preloader-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.hvnly-preloader-section-title {
    width: 200px;
    height: 28px;
    margin-bottom: 1rem;
    border-radius: 4px;
}

/* ============================================
   ORIGINAL CONTENT HIDING/SHOWING
   ============================================ */

.hvnly-original-content {
    display: none !important;
}

/* .hvnly-property-grid-view.hvnly-loaded {
    display: grid !important;
} */

.hvnly-property-grid-view.hvnly-list-view.hvnly-loaded {
    display: flex !important;
}

.hvnly-property-filter-sidebar.hvnly-loaded {
    display: block !important;
}

/* ============================================
   TOP SEARCH PRELOADER
   ============================================ */

.hvnly-top-search-preloader {
    background: var(--hvnly-card-bg, #ffffff);
    border-radius: var(--hvnly-card-radius, 8px);
    padding: var(--hvnly-card-padding, 1rem);
    box-shadow: var(--hvnly-card-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.hvnly-preloader-search-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hvnly-preloader-search-tab {
    width: 100px;
    height: 40px;
    border-radius: 4px;
}

.hvnly-preloader-search-fields {
    display: flex;
    gap: 1rem;
}

.hvnly-preloader-search-field {
    flex: 1;
    height: 42px;
    border-radius: 6px;
}

.hvnly-preloader-filter-btn {
    width: 100px;
    height: 42px;
    border-radius: 6px;
}

/* ============================================
   RELATED PROPERTIES PRELOADER
   ============================================ */

.hvnly-related-properties-preloader {
    margin-top: 2rem;
}

.hvnly-preloader-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* ============================================
   VIEW CONTROLS PRELOADER
   ============================================ */

.hvnly-view-controls-preloader {
    margin-bottom: 1.5rem;
}

.hvnly-preloader-view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hvnly-preloader-results-count {
    width: 220px;
    height: 20px;
    border-radius: 4px;
}

.hvnly-preloader-view-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hvnly-preloader-sort-label {
    width: 50px;
    height: 16px;
    border-radius: 3px;
}

.hvnly-preloader-sort-select {
    width: 160px;
    height: 38px;
    border-radius: 6px;
}

.hvnly-preloader-view-buttons {
    display: flex;
    gap: 0.5rem;
}

.hvnly-preloader-view-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

/* ============================================
   LOAD MORE PRELOADER
   ============================================ */
.hvnly-property-search-shortcode
.hvnly-load-more-preloader {display: none !important;}
.hvnly-load-more-preloader {
    margin-top: 2rem;
}

.hvnly-preloader-load-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hvnly-preloader-load-more-btn {
    width: 180px;
    height: 48px;
    border-radius: 6px;
}

.hvnly-preloader-load-more-info {
    width: 150px;
    height: 18px;
    border-radius: 3px;
}

/* ============================================
   PAGINATION PRELOADER
   ============================================ */

.hvnly-pagination-preloader {
    margin: 2rem 0;
}

.hvnly-preloader-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hvnly-preloader-pagination-info {
    width: 220px;
    height: 20px;
    border-radius: 4px;
}

.hvnly-preloader-pagination-list {
    display: flex;
    gap: 0.5rem;
}

.hvnly-preloader-pagination-item {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

/* Responsive Pagination Preloader */
@media (max-width: 768px) {
    .hvnly-preloader-pagination {
        flex-direction: column;
        align-items: center;
    }
    
    .hvnly-preloader-pagination-item {
        width: 36px;
        height: 36px;
    }
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 991px) {
    .hvnly-property-filter-sidebar.hvnly-loaded {
        display: none !important;
    }
}


@media (max-width: 1024px) {
    .hvnly-property-grid-preloader.hvnly-grid-view {
        grid-template-columns: 1fr;
    }
    
    .hvnly-preloader-carousel {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hvnly-filter-sidebar-preloader {
        position: static;
        max-height: none;
    }
    
    .hvnly-property-grid-preloader.hvnly-list-view .hvnly-property-card-preloader .hvnly-property-grid-list-thumb {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .hvnly-preloader-carousel {
        grid-template-columns: 1fr;
    }
    
    .hvnly-preloader-search-fields {
        flex-direction: column;
    }
    
    .hvnly-preloader-search-tabs {
        flex-wrap: wrap;
    }
    
    .hvnly-property-grid-preloader.hvnly-list-view .hvnly-property-card-preloader {
        flex-direction: column;
    }
    
    .hvnly-property-grid-preloader.hvnly-list-view .hvnly-property-card-preloader .hvnly-property-grid-list-thumb {
        width: 100%;
        height: 240px;
    }
}

@media (max-width: 480px) {
    .hvnly-filter-sidebar-preloader {
        padding: 1rem;
    }
}
