/* Base slider styles */
.rns-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: pan-y pinch-zoom;
}

/* Property page specific styles - hide by default on desktop */
.property-page .rns-slider-container {
    display: none;
}

/* Show property page slider only on mobile */
@media (max-width: 998px) {
    .property-page .rns-slider-container {
        display: block;
        height: 65vw;
        max-height: 500px;
    }
}

/* Results page specific styles */
.property-tile .rns-slider-container {
    display: block;
    height: 250px;
    border-radius: var(--radius-xlg) var(--radius-xlg) 0px 0px;
}

.rns-slider {
    display: flex;
    width: 100%;
    height: 100%;
    touch-action: pan-x pan-y;
    will-change: transform;
    transform: translateX(0);
    transition: transform 300ms ease-out;
}

.rns-slider:active {
    cursor: grabbing;
    transition: none;
}

.rns-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

/* Results page specific image styles */
.property-tile .rns-slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

/* Property page specific image styles */
.property-page .rns-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.rns-slide a {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Navigation Buttons */
.rns-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    padding: 0;
    /* Smooth transitions for all properties */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Prevent choppy animations */
    will-change: transform, opacity, background-color;
    /* Ensure hardware acceleration */
    transform: translateY(-50%) translateZ(0);
}

.prev-btn {
    left: 6px;
}

.next-btn {
    right: 6px;
}

/* Show buttons on container hover with smooth fade */
.rns-slider-container:hover .rns-nav-btn {
    opacity: 1;
}

/* Icon styles */
.rns-nav-btn iconify-icon {
    color: #333;
    width: 24px !important;
    height: 24px !important;
    font-size: 24px; /* This also helps with size */
}

/* Hover state */
.rns-nav-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1) translateZ(0);
}

/* Active state for touch feedback */
.rns-nav-btn:active {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-50%) scale(0.95) translateZ(0);
}

/* Counter style */
.rns-slider-counter {
    position: absolute;
    top: 16px;
    right: 16px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(8px);
    color: var(--gray600);
    padding: 6px 10px;
    border-radius: var(--radius-xlg);
    font-size: 14px;
    font-weight: 800;
    z-index: 2;
    letter-spacing: .5px;
}

/* Dots Navigation */
.rns-dots-container {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    height: 24px;
    width: 152px; /* Width to show 7 dots (odd number) */
    border: 1px solid rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: 0 8px;
    backdrop-filter: blur(4px);
    z-index: 2;
    overflow: hidden;
}

.rns-dots-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    gap: 8px;
    will-change: transform;
    transition: transform 300ms ease-out;
}

.rns-dots-wrapper:active {
    transition: none;
}

.rns-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray600);
    transition: opacity 300ms ease-out, transform 300ms ease-out;
    flex-shrink: 0;
    cursor: pointer;
    opacity: var(--dot-opacity, 0.5);
    transform: scale(var(--dot-scale, 0.8));
}

.rns-dot.micro {
    --dot-opacity: 0.2;
    --dot-scale: 0.4;
}

.rns-dot.small {
    --dot-opacity: 0.3;
    --dot-scale: 0.6;
}

.rns-dot.std {
    --dot-opacity: 0.5;
    --dot-scale: 0.8;
}

.rns-dot.rns-dot-hidden {
    --dot-opacity: 0;
    --dot-scale: 0;
    pointer-events: none;
}

/* Active state should override all other states */
.rns-dot.active {
    --dot-opacity: 1 !important;
    --dot-scale: 1.2 !important;
    background-color: var(--gray600);
}

/* Results page dots - simpler version */
.property-tile .rns-dots-container {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: 0 8px; /* Reduced padding */
    backdrop-filter: blur(4px);
    z-index: 2;
    gap: 6px; /* Slightly reduced gap between dots */
    min-width: min-content; /* Allow container to shrink to content */
    width: auto; /* Let it size naturally */
}

/* Keep the dot styles the same */
.property-tile .rns-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--gray600);
    opacity: 0.5;
    transition: opacity 0.3s ease;
    flex-shrink: 0; /* Prevent dots from shrinking */
}

.property-tile .rns-dot.active {
    opacity: 1;
}
