/* Haven favorites: hearts, toast, header heart, Saved page. */

/* ── Heart on a listing card (top right of the image) ── */
.ghhaven-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.ghhaven-heart svg {
    width: 24px;
    height: 24px;
    fill: rgba(0, 0, 0, 0.35);
    stroke: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
    transition: transform 0.15s ease;
}

.ghhaven-heart:hover svg { transform: scale(1.12); }
.ghhaven-heart.is-saved svg { fill: #ff385c; }

/* ── Heart beside the title on a listing's own page ── */
.ghhaven-heart--inline {
    position: static;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 10px;
    width: 40px;
    height: 40px;
}

.ghhaven-heart--inline svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #1A1B1A;
    filter: none;
}

.ghhaven-heart--inline.is-saved svg { fill: #ff385c; stroke: #ff385c; }

/* ── Header heart with count ── */
.ghhaven-header-heart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    color: #1A1B1A;
    text-decoration: none;
}

.ghhaven-header-heart svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* The theme's container stacks its children in a column; row it up so the
   heart sits beside the menu button (class added by favorites.js). */
#masthead .ghhaven-header-pair {
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
    width: auto !important;
}

#masthead .ghhaven-header-pair > .elementor-widget-cs_menu_toggle { flex: 0 0 auto !important; }
#masthead .ghhaven-header-pair > .ghhaven-header-heart { margin-left: 8px; }

/* White over the hero photo, dark once the bar is solid: the same
   conditions the menu button uses (see ghhaven_site_header_css). */
body:not(.ghhaven-scrolled):not(.ghhaven-solid-header) #masthead .ghhaven-header-heart {
    color: #ffffff;
}

.ghhaven-heart-badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #ff385c;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}

.ghhaven-heart-badge[hidden] { display: none; }

/* ── Toast ── */
.ghhaven-fav-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 99999;
    max-width: calc(100vw - 32px);
    padding: 12px 18px;
    border-radius: 999px;
    background: #1A1B1A;
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    transform: translate(-50%, 16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ghhaven-fav-toast.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.ghhaven-fav-toast a {
    margin-left: 12px;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
}

/* ── Saved page / My Account tab ── */
.ghhaven-saved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--gh-card-w, 267px), 1fr));
    gap: 28px var(--gh-card-gap, 20px);
}

.ghhaven-saved .cs-room-item { position: relative; }

.ghhaven-saved .featured-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ghhaven-saved[data-state="loading"] .ghhaven-saved-grid { min-height: 160px; opacity: 0.4; }

.ghhaven-saved-empty {
    padding: 48px 16px;
    text-align: center;
}

.ghhaven-saved-empty[hidden] { display: none; }
.ghhaven-saved-empty h3 { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.ghhaven-saved-empty p { margin: 0 0 20px; opacity: 0.7; }
