﻿/* Property Cards Styling */
.property-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 0.5rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
    height: 100%;
}

    .property-card:hover {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
        border-color: rgba(102, 126, 234, 0.3);
    }

.property-icon {
    font-size: 1.75rem;
    color: #667eea;
    margin-left: 1rem;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.property-content {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.property-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-weight: 400;
}

.property-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    word-break: break-word;
}

/* Boolean value styling */
.boolean-value {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

    .boolean-value i {
        font-size: 1.1rem;
    }

@media (max-width: 768px) {
    .property-card {
        padding: 0.75rem;
    }

    .property-icon {
        font-size: 1.5rem;
        margin-left: 0.75rem;
        min-width: 32px;
    }

    .property-label {
        font-size: 0.8125rem;
    }

    .property-value {
        font-size: 0.9375rem;
    }
    
    .boolean-value i {
        font-size: 1rem;
    }
}

/* Similar Ads Card - Lift on Hover */
.similar-ad-card {
    transition: all 0.3s ease;
}

.similar-ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ========================================
   IMAGE PREVIEW MODAL STYLES
   ======================================== */

.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.image-full {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.3s ease-out;
    cursor: default;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10000;
    user-select: none;
}

.nav-arrow:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow.left {
    left: 20px;
}

.nav-arrow.right {
    right: 20px;
}

/* Close button */
.preview-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.preview-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

/* Image counter */
.preview-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10001;
}

/* Remove the ::after pseudo-element since we now have a real close button */
.image-overlay::after {
    display: none;
}

/* Responsive adjustments for image preview modal */
@media (max-width: 768px) {
    .nav-arrow {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .nav-arrow.left {
        left: 10px;
    }

    .nav-arrow.right {
        right: 10px;
    }

    .image-full {
        max-width: 95vw;
        max-height: 80vh;
    }

    .preview-close-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .preview-counter {
        bottom: 15px;
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .image-overlay::after {
        content: '✕';
        padding: 10px 14px;
    }
}

/* ========================================
   FAVORITE BUTTON STYLES - PURPLE THEME
   ======================================== */

.favorite-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0.5rem !important;
    background: white !important;
    color: #667eea !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.favorite-btn i {
    font-size: 1.25rem !important;
    transition: all 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    color: #667eea !important;
}

.favorite-btn:hover {
    background: rgba(102, 126, 234, 0.1) !important;
    color: #667eea !important;
    transform: scale(1.1);
}

.favorite-btn:hover i {
    color: #667eea !important;
}

.favorite-btn:active {
    transform: scale(0.95) !important;
}

.favorite-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

/* When favorited - filled heart with purple */
.favorite-btn i.bi-heart-fill {
    color: #667eea !important;
}

.favorite-btn:hover i.bi-heart-fill {
    color: #764ba2 !important;
}

/* Mobile adjustments for favorite button - ALIGN WITH TITLE */
@media (max-width: 768px) {
    .favorite-btn {
        /* Keep same size as desktop - enforce strictly */
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .favorite-btn i {
        /* Keep same icon size */
        font-size: 1.25rem !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Adjust title and button container - align in same line */
    .mb-3 .d-flex.justify-content-between {
        gap: 0.5rem !important;
        align-items: center !important; /* Changed from flex-start to center */
    }

    .h3.text-purple {
        font-size: 1.25rem;
        line-height: 1.3;
        flex: 1;
        min-width: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
        margin-bottom: 0 !important; /* Remove bottom margin to align properly */
    }
}

@media (max-width: 576px) {
    .favorite-btn {
        /* Keep same size on small mobile too */
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .favorite-btn i {
        font-size: 1.25rem !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mb-3 .d-flex.justify-content-between {
        align-items: center !important; /* Ensure alignment on small screens */
    }

    .h3.text-purple {
        font-size: 1.15rem;
        line-height: 1.2;
        margin-bottom: 0 !important;
    }
}
