/* ============================================================
   Favorites (saved projects) + Map view
   Editorial graphite + brass — pairs with site.css / projects.css.
   Owned by the Favorites/Map feature.
   ============================================================ */

/* ===== Heart toggle on project cards ===== */
.pc-fav {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    background: rgba(31, 41, 55, .42);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.pc-fav:hover { background: rgba(31, 41, 55, .72); color: #fff; transform: translateY(-1px); }
.pc-fav:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.pc-fav .bi-heart-fill { color: var(--brass); }
.pc-fav.is-fav {
    background: #fff;
    border-color: #fff;
    color: var(--brass);
}
.pc-fav.is-fav:hover { background: #fff; color: var(--brass-dark); }

/* ===== Header / inline favorites widget ===== */
.fav-widget {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: inherit;
    font-family: var(--sans);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .3px;
}
.fav-widget i { font-size: 1.05rem; color: var(--brass); }
.fav-widget:hover { color: var(--brass); }
.fav-widget .fav-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--brass);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
}
.fav-widget .fav-count-badge.is-empty {
    background: var(--rule);
    color: var(--muted);
}

/* ===== Favorites page ===== */
.fav-head { padding: 64px 0 0; background: var(--bg); }
.fav-head .eyebrow { margin-bottom: .4rem; }
.fav-head .display-head { margin-bottom: .6rem; }
.fav-head .fav-lede { color: var(--muted); max-width: 640px; font-size: 1.02rem; }
.fav-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }

.fav-grid { background: var(--bg); }

.fav-empty { text-align: center; padding: 4rem 1rem; }
.fav-empty i { font-size: 2.6rem; color: var(--brass); }
.fav-empty h4 { margin-top: 1rem; }
.fav-empty p { color: var(--muted); max-width: 460px; margin: .4rem auto 1.4rem; }

.fav-loading { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.fav-loading .spinner-border { color: var(--brass); }

/* On the favorites page the heart sits on a tinted (graphite) chip even when
   not saved, so users understand they can un-save. */
[data-fav-page] .pc-fav { background: rgba(31, 41, 55, .55); }

/* ===== Map page ===== */
.map-head { padding: 56px 0 0; background: var(--bg); }
.map-head .eyebrow { margin-bottom: .4rem; }
.map-head .display-head { margin-bottom: .6rem; }
.map-head .map-lede { color: var(--muted); max-width: 640px; font-size: 1.02rem; }

.map-wrap { position: relative; margin: 2rem 0 0; border: 1px solid var(--rule); background: var(--surface); }
#aicMap {
    height: clamp(440px, 70vh, 720px);
    width: 100%;
    background: #e8e3dc;
}

/* Leaflet popup — editorial card look */
.aic-pop { width: 232px; font-family: var(--sans); }
.aic-pop-fig { display: block; width: 100%; height: 130px; object-fit: cover; background: #e8e3dc; }
.aic-pop-body { padding: .7rem .2rem .2rem; }
.aic-pop-tags { font-size: .68rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin-bottom: .25rem; }
.aic-pop-title { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); margin: 0 0 .55rem; line-height: 1.2; }
:lang(bn) .aic-pop-title { font-family: var(--bengali); }
.aic-pop-link {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .82rem; font-weight: 600; color: var(--brass);
}
.aic-pop-link:hover { color: var(--brass-dark); }
.aic-pop-link i { transition: transform .2s ease; }
.aic-pop-link:hover i { transform: translateX(3px); }

/* Tame Leaflet's default popup chrome to match the site */
.leaflet-popup-content-wrapper { border-radius: 0; box-shadow: 0 8px 28px rgba(31, 41, 55, .18); }
.leaflet-popup-content { margin: .65rem .8rem; }
.leaflet-container { font-family: var(--sans); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }

.map-empty { text-align: center; padding: 4rem 1rem; }
.map-empty i { font-size: 2.6rem; color: var(--brass); }
.map-empty h4 { margin-top: 1rem; }
.map-empty p { color: var(--muted); max-width: 460px; margin: .4rem auto 1.4rem; }

@media (max-width: 575.98px) {
    .fav-head, .map-head { padding-top: 40px; }
    #aicMap { height: 60vh; }
}
