/**
 * BeachBox — Favorites Drawer styles
 * Upload to: /wp-content/uploads/favorites-drawer/favorites-drawer.css
 * Enqueued by the companion PHP snippet.
 *
 * 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: #E76957 !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: 6px !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px 7px !important;
    box-shadow: -3px 4px 14px rgba(0, 0, 0, 0.16) !important;
    transition: padding-left 0.25s, opacity 0.3s, transform 0.3s;
    font-family: 'Jost', 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: 11px !important;
    background: #E76957 !important;
}
.hr-fav-trigger svg {
    width: 17px;
    height: 17px;
    fill: #fff !important;
    stroke: #fff !important;
    stroke-width: 2;
    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: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

/* Badge count */
.hr-fav-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    font-size: 10px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    font-family: 'Jost', Arial, Helvetica, sans-serif;
    flex-shrink: 0;
}
.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: #FEFBFB;
    z-index: 100000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    font-family: 'Jost', Arial, Helvetica, sans-serif;
}
.hr-fav-drawer.open {
    transform: translateX(0);
}

/* Drawer header */
.hr-fav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(231, 105, 87, 0.18);
    flex-shrink: 0;
}
.hr-fav-drawer-header h3 {
    margin: 0;
    font-family: 'Bree Rg', 'Bree Serif', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: #1E1E1E;
}
.hr-fav-drawer-close {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 24px;
    cursor: pointer;
    color: #9E9E9E !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1;
    transition: color 0.2s;
}
.hr-fav-drawer-close:hover {
    color: #1E1E1E !important;
    background: none !important;
}

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

/* Loading skeleton */
.hr-fav-loading { padding: 0; }
.hr-fav-skeleton {
    display: flex;
    background: #FBEFEA;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.hr-fav-skeleton-img {
    width: 160px;
    min-height: 120px;
    flex-shrink: 0;
    background: #FAE0D8;
    position: relative;
    overflow: hidden;
}
.hr-fav-skeleton-info {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.hr-fav-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: #FAE0D8;
    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.5), 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: 60px 20px;
    color: #9E9E9E;
}
.hr-fav-empty svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: #CCCCCC;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    margin-bottom: 16px;
}
.hr-fav-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Property card */
.hr-fav-card {
    display: flex;
    background: #FBEFEA;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    text-decoration: none !important;
    transition: box-shadow 0.2s;
    cursor: pointer;
    color: inherit !important;
}
.hr-fav-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
}
.hr-fav-card-img {
    width: 160px;
    min-height: 120px;
    flex-shrink: 0;
    background: #FAE0D8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hr-fav-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hr-fav-card-img-placeholder {
    width: 36px;
    height: 36px;
    opacity: 0.35;
    fill: none;
    stroke: #E76957;
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.hr-fav-card-info {
    flex: 1;
    padding: 14px 16px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hr-fav-card-location {
    font-size: 12px;
    color: #9E9E9E !important;
    margin: 0 0 4px 0;
    line-height: 1.3;
}
.hr-fav-card-title {
    display: block;
    font-family: 'Bree Rg', 'Bree Serif', Georgia, serif;
    font-size: 17px;
    font-weight: 500;
    color: #1E1E1E !important;
    text-decoration: none !important;
    line-height: 1.3;
    margin: 0 0 8px 0;
}
.hr-fav-card-specs {
    font-size: 13px;
    color: #54595F !important;
    margin: 0;
    line-height: 1.3;
}
.hr-fav-card-specs .hr-spec-dot {
    margin: 0 6px;
    color: #CCCCCC;
}
.hr-fav-card-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #FEFBFB !important;
    border: none !important;
    cursor: pointer;
    color: #54595F !important;
    width: 24px !important;
    height: 24px !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;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}
.hr-fav-card-remove:hover {
    background: #E76957 !important;
    color: #fff !important;
}
.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 10px !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    vertical-align: middle;
    transition: transform 0.2s;
}
.hr-pdp-fav-btn:hover {
    transform: none;
    background: none !important;
}
.hr-pdp-fav-btn svg { width: 17px; height: 17px; }
.hr-pdp-fav-btn svg path {
    fill: none !important;
    stroke: #1E1E1E !important;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: fill 0.2s, stroke 0.2s;
}
.hr-pdp-fav-btn.active svg path {
    fill: #E76957 !important;
    stroke: #E76957 !important;
}
.hr-pdp-fav-label {
    font-family: 'Jost', Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #1E1E1E !important;
}

/* ── Favorite heart injected on Explorer / listing cards ── */
.hr-card-fav-btn {
    position: absolute !important;
    top: 12px;
    right: 12px;
    z-index: 30;
    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: #fff !important;
    stroke: #fff !important;
    stroke-width: 1.5;
    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: #E76957 !important;
    stroke: #E76957 !important;
}
