/**
 * VayroHub React Saved Ads Wishlist Styles
 * Version: 1.1.0 (Polished Header Pill & Positioning)
 */

/* 1. Header Saved Trigger Pill (Placed in Header Actions next to Post Ad) */
.vy-react-wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff1f2;
    border: 1.5px solid #fecdd3;
    border-radius: 9999px;
    padding: 8px 16px;
    color: #e11d48;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    box-shadow: 0 1px 3px rgba(225, 29, 72, 0.08);
    line-height: 1;
    white-space: nowrap;
}

.vy-react-wishlist-btn:hover {
    background: #ffe4e6;
    border-color: #fda4af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.18);
    color: #be123c;
}

.vy-react-wishlist-btn i.fa-heart {
    color: #e11d48;
    font-size: 15px;
    transition: transform 0.2s ease;
}

.vy-react-wishlist-btn:hover i.fa-heart {
    transform: scale(1.25);
}

.vy-wishlist-badge {
    background: #e11d48;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    min-width: 19px;
    height: 19px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4);
    animation: vyBadgePop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes vyBadgePop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.25); }
    100% { transform: scale(1); opacity: 1; }
}

/* 2. Listing Card Favorite Heart Button */
.vy-card-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 16px;
    z-index: 5;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    outline: none;
}

.vy-card-fav-btn:hover {
    transform: scale(1.12);
    background: #ffffff;
    color: #e11d48;
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.25);
}

.vy-card-fav-btn.is-active {
    background: #ffe4e6;
    color: #e11d48;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3);
}

.vy-card-fav-btn.is-active i {
    animation: vyHeartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes vyHeartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* 3. Wishlist Slide-Over Drawer */
.vy-wishlist-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vy-wishlist-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.vy-wishlist-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    z-index: 999999;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

.vy-wishlist-backdrop.is-open .vy-wishlist-drawer {
    transform: translateX(0);
}

/* 4. Drawer Header */
.vy-wishlist-head {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.vy-wishlist-head__title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vy-wishlist-head__title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vy-wishlist-head__count {
    background: #0066cc;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
}

.vy-wishlist-head__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vy-wishlist-clear-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.vy-wishlist-clear-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

.vy-wishlist-close-btn {
    background: #e2e8f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #475569;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vy-wishlist-close-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
    transform: rotate(90deg);
}

/* 5. Drawer Body */
.vy-wishlist-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Empty State */
.vy-wishlist-empty {
    margin: auto;
    text-align: center;
    padding: 40px 20px;
    max-width: 320px;
}

.vy-wishlist-empty__icon {
    width: 72px;
    height: 72px;
    background: #ffe4e6;
    color: #f43f5e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 18px;
}

.vy-wishlist-empty__title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.vy-wishlist-empty__desc {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 22px;
}

.vy-wishlist-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0066cc;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.vy-wishlist-browse-btn:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.35);
    color: #ffffff;
}

/* Saved Item Card */
.vy-wishlist-item {
    display: flex;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    position: relative;
    transition: all 0.25s ease;
}

.vy-wishlist-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.vy-wishlist-item__img-wrap {
    width: 84px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
}

.vy-wishlist-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vy-wishlist-item__details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vy-wishlist-item__title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.vy-wishlist-item__title:hover {
    color: #0066cc;
}

.vy-wishlist-item__price {
    font-size: 15px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 4px;
}

.vy-wishlist-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 8px;
}

.vy-wishlist-item__tag {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.vy-wishlist-item__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vy-wishlist-item__chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25d366;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.vy-wishlist-item__chat-btn:hover {
    background: #1eb954;
    color: #ffffff;
    transform: translateY(-1px);
}

.vy-wishlist-item__view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.vy-wishlist-item__view-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.vy-wishlist-item__remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.vy-wishlist-item__remove-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* 6. Drawer Footer */
.vy-wishlist-foot {
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vy-wishlist-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.vy-wishlist-total-price {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.vy-wishlist-inquire-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25d366;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    padding: 13px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.vy-wishlist-inquire-all-btn:hover {
    background: #1eb954;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Responsive Mobile Bottom Sheet */
@media (max-width: 576px) {
    .vy-wishlist-drawer {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        height: 85vh;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
    }

    .vy-wishlist-backdrop.is-open .vy-wishlist-drawer {
        transform: translateY(0);
    }
}
