/* ==============================================
   MAIN - Global Variables & Utilities
   Property Search Page
   ============================================== */

/* Use same navbar height as global variables.css */
:root {
    /* These should match variables.css exactly */
    --search-navbar-height: 56px;
    --search-navbar-height-mobile: 50px;

    /* Animation timing */
    --animation-fast: 0.15s;
    --animation-normal: 0.25s;
    --animation-slow: 0.4s;

    /* Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Remove default button styles */
button {
    font-family: inherit;
}

/* Global Transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Focus States */
:focus-visible {
    outline: 2px solid #222;
    outline-offset: 2px;
}

/* Utility: Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered card animation */
.property-card {
    animation: fadeInUp 0.35s var(--ease-out-expo) backwards;
}

.property-card:nth-child(1) {
    animation-delay: 0.02s;
}

.property-card:nth-child(2) {
    animation-delay: 0.04s;
}

.property-card:nth-child(3) {
    animation-delay: 0.06s;
}

.property-card:nth-child(4) {
    animation-delay: 0.08s;
}

.property-card:nth-child(5) {
    animation-delay: 0.10s;
}

.property-card:nth-child(6) {
    animation-delay: 0.12s;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Image placeholder */
.image-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark Mode Utilities */
[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

/* Responsive - disable animation delays on mobile for snappier feel */
@media (max-width: 768px) {
    .property-card {
        animation-delay: 0s !important;
        animation-duration: 0.25s;
    }
}