/* ============================================= */
/*  FontAwesome Icon Fix - MUST BE AT TOP       */
/* ============================================= */

.fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fa-heart::before {
    content: "\f004";
}

/* ============================================= */
/*  Property List Wrapper                        */
/* ============================================= */

#property-list-wrapper {
    margin-top: 30px;
}

/* ============================================= */
/*  Property List Item Wrapper with Favorite     */
/* ============================================= */

.property-list-item-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.property-list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: #212529;
    transition: background-color 0.2s ease-in-out;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    border: 1px solid #dee2e6;
    flex: 1;
}

/* ============================================= */
/*  Alternating Row Stripes                      */
/* ============================================= */

#property-list-container .property-list-item-wrapper:nth-child(even) .property-list-item {
    background-color: #f8f9fa !important;
}

#property-list-container .property-list-item-wrapper:nth-child(odd) .property-list-item {
    background-color: #ffffff !important;
}

#property-list-container .property-list-item:hover {
    background-color: #e9ecef !important;
}

/* ============================================= */
/*  Property Details Styling                     */
/* ============================================= */

.property-photo {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    margin-right: 1rem;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.property-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-details {
    flex-grow: 1;
}

.property-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.property-tags .badge {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.3em 0.6em;
}

/* Badge Colors */
.badge.tenure-F { background-color: #ff40ff; color: white; }
.badge.tenure-L { background-color: #ff9800; color: white; }
.badge.business-type-FC { background-color: #1e88e5; color: white; }
.badge.business-type-CT { background-color: #43a047; color: white; }
.badge.business-type-CR { background-color: #9370DB; color: white; }
.badge.business-type-PZ { background-color: #8e24aa; color: white; }

.property-specs {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
}

.property-specs i {
    color: #0d6efd;
    margin-right: 0.4rem;
    width: 16px;
}

.property-arrow {
    font-size: 1rem;
    color: #adb5bd;
    margin-left: 1rem;
}

/* ============================================= */
/*  Favorite Button - UNIFIED STYLING            */
/* ============================================= */

.favorite-btn {
    position: absolute;
    left: 6px;
    top: 6px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #dee2e6;
    border-radius: 50%;
    padding: 0.45rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    z-index: 10;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ============================================= */
/*  Heart Icon Color Control                     */
/* ============================================= */

/* Default: Gray outline heart */
.favorite-btn i.fa-regular.fa-heart {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    color: #6c757d !important;
}

/* Favorited: Red solid heart */
.favorite-btn i.fa-solid.fa-heart,
.favorite-btn.is-favorite i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    color: #dc3545 !important;
}

/* Force solid content for favorited state */
.favorite-btn.is-favorite i::before {
    content: "\f004" !important;
    font-weight: 900 !important;
}

/* ============================================= */
/*  Favorite Button States                       */
/* ============================================= */

.favorite-btn:hover {
    transform: scale(1.15);
    background: #fff;
    border-color: #dc3545;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
}

.favorite-btn:hover i {
    color: #dc3545 !important;
}

.favorite-btn.is-favorite {
    background: #fff;
    border-color: #dc3545;
    animation: heartPop 0.3s ease;
}

.favorite-btn:active {
    transform: scale(0.95);
}

.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.favorite-btn:disabled:hover {
    transform: none;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* ============================================= */
/*  Advertisement Card Styling                   */
/* ============================================= */

.advertisement-card {
    margin: 1rem 0;
    padding: 0;
}

.advert-image {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================= */
/*  Toast Notification Styling                   */
/* ============================================= */

.toast-container {
    bottom: 20px !important;
    right: 20px !important;
}

.toast {
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.1);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    min-width: 250px;
}

.toast-body {
    padding: 0.75rem 1rem;
    color: #212529;
    font-size: 16px;
}

.toast.toast-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.toast.toast-success .toast-body {
    color: #0f5132;
    font-weight: 500;
}

.toast.toast-error {
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.toast.toast-error .toast-body {
    color: #842029;
    font-weight: 500;
}

.toast.toast-info {
    background-color: #cff4fc;
    border-color: #b6effb;
}

.toast.toast-info .toast-body {
    color: #055160;
    font-weight: 500;
}

.toast .btn-close {
    margin-right: 0.5rem;
}

/* ============================================= */
/*  Mobile Optimizations                         */
/* ============================================= */

@media (max-width: 768px) {
    .toast-container {
        top: 70px !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translateX(-50%);
        width: 90%;
        max-width: 350px;
    }
}

@media (max-width: 576px) {
    .property-photo {
        width: 80px;
        height: 64px;
    }

    .property-title {
        font-size: 0.9rem;
    }

    .property-specs {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .favorite-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        padding: 0.35rem;
    }

    .toast-body {
        font-size: 14px;
        padding: 0.6rem 0.8rem;
    }
}