/**
 * Endless Stays — Favorites Drawer styles
 * Upload to: /wp-content/uploads/favorites-drawer/favorites-drawer.css
 * Enqueued by the companion PHP snippet.
 *
 * Brand tokens:
 *   purple #4a1a6b · italic accent #622d7f · gold #e8952f
 *   cream #f9f6f1 · body text #5a4d63 · borders rgba(74,26,107,.1)
 *   Dela Gothic One (display) · Fraunces italic (accent) · Montserrat (body) · Inter (UI labels)
 *
 * NOTE: The trigger tab and the buttons use !important on background/color/
 * border/box-shadow/fill/stroke. They're <button> elements, and the WordPress
 * theme + Elementor kit apply their own button styles (light background, dark
 * text, border-radius, padding) that otherwise bleed in and break the look.
 */

/* ── Vertical Side Tab ── */
.hr-fav-trigger {
    position: fixed !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%);
    z-index: 99998;
    background: #4a1a6b !important;
    border: none !important;
    border-radius: 14px 0 0 14px !important;
    cursor: pointer;
    display: none !important; /* hidden until JS adds .is-visible (>=1 favorite) */
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 13px 8px !important;
    box-shadow: -6px 8px 24px -10px rgba(74, 26, 107, 0.45) !important;
    transition: padding-left 0.25s, background 0.25s, opacity 0.3s, transform 0.3s;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    line-height: 1 !important;
}
.hr-fav-trigger.is-visible {
    display: flex !important;
}
.hr-fav-trigger.is-entering {
    opacity: 0;
    transform: translateY(-50%) translateX(20px);
}
.hr-fav-trigger:hover {
    padding-left: 12px !important;
    background: #e8952f !important;
}
.hr-fav-trigger svg {
    width: 18px;
    height: 18px;
    fill: #fff !important;
    stroke: #fff !important;
    stroke-width: 1.6;
    stroke-linejoin: round;
    stroke-linecap: round;
    pointer-events: none;
    flex-shrink: 0;
}
.hr-fav-trigger-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #fff !important;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

/* Badge count */
.hr-fav-badge {
    background: #e8952f !important;
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.hr-fav-trigger:hover .hr-fav-badge {
    background: #4a1a6b !important;
}
.hr-fav-badge:empty {
    display: none;
}

/* ── Overlay ── */
.hr-fav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.hr-fav-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ── Drawer ── */
.hr-fav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 92vw;
    background: #f9f6f1;
    z-index: 100000;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    box-shadow: -30px 0 60px -30px rgba(74, 26, 107, 0.35);
}
.hr-fav-drawer.open {
    transform: translateX(0);
}

/* Drawer header */
.hr-fav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(74, 26, 107, 0.1);
    flex-shrink: 0;
}
.hr-fav-drawer-header h3 {
    margin: 0;
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    color: #4a1a6b;
    letter-spacing: 0.2px;
}
.hr-fav-drawer-header h3 .it {
    font-family: 'Fraunces', serif;
    font-style: italic;
    color: #622d7f;
    font-weight: 400;
}
.hr-fav-drawer-close {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 34px !important;
    line-height: 1 !important;
    cursor: pointer;
    color: #4a1a6b !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s, transform 0.2s, background 0.2s;
}
.hr-fav-drawer-close:hover {
    opacity: 1;
    color: #e8952f !important;
    background: rgba(74, 26, 107, 0.06) !important;
    transform: rotate(90deg);
}

/* Drawer body */
.hr-fav-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 28px;
}

/* Loading skeleton */
.hr-fav-loading { padding: 0; }
.hr-fav-skeleton {
    display: flex;
    background: #fff;
    border: 1px solid rgba(74, 26, 107, 0.08);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px -14px rgba(74, 26, 107, 0.25);
}
.hr-fav-skeleton-img {
    width: 160px;
    min-height: 124px;
    flex-shrink: 0;
    background: rgba(74, 26, 107, 0.06);
    position: relative;
    overflow: hidden;
}
.hr-fav-skeleton-info {
    flex: 1;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.hr-fav-skeleton-line {
    height: 12px;
    border-radius: 100px;
    background: rgba(74, 26, 107, 0.07);
    position: relative;
    overflow: hidden;
}
.hr-fav-skeleton-line.location { width: 40%; }
.hr-fav-skeleton-line.title { width: 75%; height: 16px; }
.hr-fav-skeleton-line.specs { width: 60%; }
.hr-fav-skeleton-line::after,
.hr-fav-skeleton-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: hrShimmer 1.4s infinite;
}
@keyframes hrShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Empty state */
.hr-fav-empty {
    text-align: center;
    padding: 64px 24px;
    color: #5a4d63;
}
.hr-fav-empty svg {
    width: 52px;
    height: 52px;
    fill: none;
    stroke: rgba(74, 26, 107, 0.4);
    stroke-width: 1.6;
    stroke-linejoin: round;
    stroke-linecap: round;
    margin-bottom: 18px;
}
.hr-fav-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #5a4d63;
}
.hr-fav-empty p .it {
    font-family: 'Fraunces', serif;
    font-style: italic;
    color: #4a1a6b;
}

/* Property card */
.hr-fav-card {
    display: flex;
    background: #fff;
    border: 1px solid rgba(74, 26, 107, 0.1);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px -16px rgba(74, 26, 107, 0.25);
    position: relative;
    text-decoration: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    color: inherit !important;
}
.hr-fav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 40px -22px rgba(74, 26, 107, 0.4);
    border-color: rgba(74, 26, 107, 0.18);
    text-decoration: none !important;
}
.hr-fav-card-img {
    width: 160px;
    min-height: 124px;
    flex-shrink: 0;
    background: rgba(74, 26, 107, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hr-fav-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s ease;
}
.hr-fav-card:hover .hr-fav-card-img img {
    transform: scale(1.06);
}
.hr-fav-card-img-placeholder {
    width: 36px;
    height: 36px;
    opacity: 0.5;
    fill: none;
    stroke: #4a1a6b;
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.hr-fav-card-info {
    flex: 1;
    padding: 16px 18px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hr-fav-card-location {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #e8952f !important;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin: 0 0 6px 0;
    line-height: 1.3;
}
.hr-fav-card-title {
    display: block;
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #4a1a6b !important;
    text-decoration: none !important;
    line-height: 1.3;
    margin: 0 0 10px 0;
    letter-spacing: 0.1px;
}
.hr-fav-card-specs {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #5a4d63 !important;
    margin: 0;
    line-height: 1.4;
}
.hr-fav-card-specs .hr-spec-dot {
    margin: 0 7px;
    color: rgba(74, 26, 107, 0.3);
}
.hr-fav-card-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff !important;
    border: 1px solid rgba(74, 26, 107, 0.1) !important;
    cursor: pointer;
    color: #4a1a6b !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(74, 26, 107, 0.18) !important;
}
.hr-fav-card-remove:hover {
    background: #e8952f !important;
    color: #fff !important;
    border-color: #e8952f !important;
    transform: rotate(90deg);
}
.hr-fav-card-remove svg {
    width: 12px;
    height: 12px;
    display: block;
}

/* ── PDP "SAVE" button ── */
.hr-pdp-fav-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 0 0 16px !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    vertical-align: middle;
    transition: transform 0.2s;
}
.hr-pdp-fav-btn:hover {
    transform: translateY(-1px);
    background: none !important;
}
.hr-pdp-fav-btn svg { width: 19px; height: 19px; }
.hr-pdp-fav-btn svg path {
    fill: none !important;
    stroke: #4a1a6b !important;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: fill 0.25s, stroke 0.25s;
}
.hr-pdp-fav-btn:hover svg path {
    stroke: #e8952f !important;
}
.hr-pdp-fav-btn.active svg path {
    fill: #e8952f !important;
    stroke: #e8952f !important;
}
.hr-pdp-fav-label {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #4a1a6b !important;
}

/* ── Favorite heart injected on Explorer / listing cards ── */
.hr-card-fav-btn {
    position: absolute !important;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px !important;
    height: 34px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.15s;
}
.hr-card-fav-btn:hover {
    transform: scale(1.12);
    background: none !important;
}
.hr-card-fav-btn svg {
    width: 26px;
    height: 26px;
    fill: none !important;
    stroke: #fff !important;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
    transition: fill 0.2s, stroke 0.2s;
}
.hr-card-fav-btn.active svg {
    fill: #e63946 !important;
    stroke: #e63946 !important;
}
