/* =============================================================
   HPL Social — share bar, email panel, hearts, favorites tab
   ============================================================= */

/* ── Share bar ──────────────────────────────────────────────── */

.hpl-share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 0;
    padding: 14px 0;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.hpl-share-label {
    font-size: 13px;
    color: #888;
    margin-right: 4px;
    flex-shrink: 0;
}

.hpl-share-btn,
.hpl-share-copy {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid #e0e0e0 !important;
    background: #fff !important;
    cursor: pointer !important;
    color: #555 !important;
    transition: background .15s, color .15s, border-color .15s !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

.hpl-share-btn svg,
.hpl-share-copy svg {
    width: 16px;
    height: 16px;
}

.hpl-share-fb:hover  { background: #1877f2; color: #fff; border-color: #1877f2; }
.hpl-share-x:hover   { background: #000;    color: #fff; border-color: #000; }
.hpl-share-pin:hover { background: #e60023; color: #fff; border-color: #e60023; }
.hpl-share-email:hover,
.hpl-share-copy:hover { background: #8B1A1A; color: #fff; border-color: #8B1A1A; }

.hpl-share-copy.hpl-copied { background: #1a7f37; color: #fff; border-color: #1a7f37; }

/* ── Email panel ────────────────────────────────────────────── */

.hpl-email-panel {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 18px;
    margin: 10px 0 0;
}

.hpl-email-loggedin p {
    margin: 0 0 12px;
    font-size: 14px;
    color: #444;
}

.hpl-email-loggedin .hpl-email-cancel,
.hpl-email-form .hpl-email-cancel {
    background: none;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 10px;
}

.hpl-email-intro {
    margin: 0 0 10px;
    font-size: 14px;
    color: #444;
}

.hpl-email-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.hpl-email-fields input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.hpl-email-fields input:focus {
    outline: none;
    border-color: #8B1A1A;
}

.hpl-email-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hpl-email-msg {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}

.hpl-email-msg.hpl-msg-ok    { background: #ecfdf5; color: #1a7f37; border: 1px solid #a7f3d0; }
.hpl-email-msg.hpl-msg-error { background: #fef2f2; color: #c0392b; border: 1px solid #fca5a5; }

/* ── Heart button on cards ──────────────────────────────────── */

.hpl-result-card {
    position: relative; /* needed for absolute heart */
}

.hpl-heart-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s, transform .15s;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

.hpl-heart-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.hpl-heart-btn .hpl-heart-icon,
button.hpl-heart-btn svg {
    width: 16px !important;
    height: 16px !important;
    stroke: #aaa !important;
    fill: none !important;
    transition: stroke .15s, fill .15s;
    pointer-events: none;
    color: #aaa !important;
}

.hpl-heart-btn.hpl-heart-active .hpl-heart-icon,
button.hpl-heart-btn.hpl-heart-active svg {
    stroke: #e0334c !important;
    fill: #e0334c !important;
}

/* ── Heart on single listing ────────────────────────────────── */

.hpl-single-heart-wrap {
    margin: 10px 0 0;
}

.hpl-heart-single {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #444 !important;
    cursor: pointer !important;
    transition: background .15s, border-color .15s, color .15s !important;
    box-shadow: none !important;
    transform: none !important;
}

.hpl-heart-single:hover {
    background: #fef2f2 !important;
    border-color: #e0334c !important;
    color: #e0334c !important;
}

.hpl-heart-single .hpl-heart-icon,
button.hpl-heart-single svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    stroke: #444 !important;
    fill: none !important;
    color: #444 !important;
}

.hpl-heart-single.hpl-heart-active {
    background: #fef2f2 !important;
    border-color: #e0334c !important;
    color: #e0334c !important;
}

.hpl-heart-single.hpl-heart-active .hpl-heart-icon,
button.hpl-heart-single.hpl-heart-active svg {
    stroke: #e0334c !important;
    fill: #e0334c !important;
}

.hpl-heart-label {
    font-size: 15px;
    font-weight: 700;
}

/* ── Heart loading state ────────────────────────────────────── */

.hpl-heart-btn.hpl-heart-loading {
    opacity: .6;
    pointer-events: none;
}

/* ── My Favorites sidebar button ────────────────────────────── */

.hpl-favs-sidebar-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 11px 14px 16px !important;
    margin-bottom: 16px !important;
    border: none !important;
    border-bottom: 1px solid #e0e0e0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #8B1A1A !important;
    cursor: pointer !important;
    transition: color .15s !important;
    text-align: center !important;
    letter-spacing: .01em !important;
    box-shadow: none !important;
}

.hpl-favs-sidebar-btn svg {
    flex-shrink: 0;
    stroke: #8B1A1A !important;
    fill: none;
    transition: fill .15s, stroke .15s;
}

.hpl-favs-sidebar-btn:hover {
    color: #6e1414 !important;
    background: #fff !important;
}

.hpl-favs-sidebar-btn:hover svg {
    stroke: #6e1414 !important;
}

.hpl-favs-btn--active {
    color: #8B1A1A !important;
    background: #fff !important;
}

.hpl-favs-btn--active svg {
    fill: #8B1A1A !important;
    stroke: #8B1A1A !important;
}

/* ── Toast notifications ────────────────────────────────────── */

.hpl-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #222;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity .25s, transform .25s;
    white-space: nowrap;
    pointer-events: none;
}

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

/* ── Favorites grid on shortcode page ───────────────────────── */

.hpl-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

@media (max-width: 600px) {
    .hpl-email-fields {
        flex-direction: column;
    }
    .hpl-view-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}
