/* ==========================================================
   FAVORITES STYLES
========================================================== */

/* Favorites grid layout */
#favorites-grid.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

#favorites-grid.row > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Header & Footer favorites badge */
.header-favorites-link,
.navbar-favorites-link,
.footer-favorites-link {
    position: relative;
    display: inline-block;
}

.favorites-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--rouge-barnes);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
}

/* Property favorite button */
.property-favorite {
    cursor: pointer;
    transition: all 0.2s ease;
}

.property-favorite i {
    font-size: 20px;
    color: var(--white);
    transition: all 0.2s ease;
}

.property-favorite:hover i {
    transform: scale(1.1);
}

.property-favorite.is-favorite i {
    color: var(--rouge-barnes);
}

/* Toast notification */
.favorites-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--noir-barnes);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.favorites-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Favorites page */
.favorites-page {
    min-height: 60vh;
}

.favorites-page .page-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 40px;
    color: var(--noir-barnes);
}

.no-favorites {
    text-align: center;
    padding: 60px 20px;
}

.no-favorites i {
    color: #ccc;
    margin-bottom: 20px;
}

.no-favorites h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--noir-barnes);
}

.no-favorites p {
    font-size: 16px;
    color: #666;
    margin-bottom: 24px;
}

.favorites-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.loading-favorites {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Clear all button in favorites page */
.btn-clear-favorites {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--rouge-barnes);
    border: 1px solid var(--rouge-barnes);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-favorites:hover {
    background: var(--rouge-barnes);
    color: var(--white);
}

/* Spinner loading */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Confirm Delete Modal Styles */
#confirmDeleteModal .modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#confirmDeleteModal .modal-header {
    padding: 24px 24px 16px;
}

#confirmDeleteModal .modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--noir-barnes);
}

#confirmDeleteModal .modal-body {
    padding: 0 24px 24px;
}

#confirmDeleteModal .modal-body p {
    margin-bottom: 8px;
    font-size: 15px;
    color: #333;
}

#confirmDeleteModal .modal-footer {
    padding: 16px 24px 24px;
    gap: 12px;
}

#confirmDeleteModal .btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#confirmDeleteModal .btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 50px;
}

#confirmDeleteModal .btn-secondary:hover {
    background: #e0e0e0;
    color: #333;
}

#confirmDeleteModal .btn-danger {
    background: var(--rouge-barnes);
    border: none;
    border-radius: 50px;

}

#confirmDeleteModal .btn-danger:hover {
    background: #9a0025;
}

#no-favorites{
    background-color: #f5f5f5;
    border-radius: 10px;
}

#no-favorites .btn-decouvrir{
    background: var(--rouge-barnes);
    color: var(--white);
    border-radius: 50px;
    padding: 16px 26px;
    font-size: 12px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

#no-favorites .btn-decouvrir:hover{
    background: #9a0025;
}

/* ==========================================================
   FAVORITES TOOLBAR
========================================================== */
#favorites-container .search-results-toolbar {
    background: #f8f8f8;
}

/* Mobile fix */
@media (max-width: 768px) {
    #favorites-container .search-results-toolbar .toolbar-inner {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }

    /* Swap order: sort dropdown first, then results count */
    #favorites-container .toolbar-left {
        order: 2;
        flex: 1;
        justify-content: flex-end;
    }

    #favorites-container .toolbar-left .results-count {
        text-align: right;
    }

    #favorites-container .toolbar-center {
        order: 1;
        flex: 0 0 auto;
        justify-content: flex-start;
    }

    #favorites-container .toolbar-right {
        order: 3;
        flex: 0 0 100%;
        justify-content: center;
        margin-top: 10px;
    }

    /* Dropdown opens to the right instead of left */
    #favorites-container .sort-menu {
        left: 0;
        right: auto;
    }
}
