/**
 * Wishlist Slide-Out Panel Styles for HOCR
 * Right-side panel that slides in when wishlist icon is clicked
 */

/* Wishlist icon in header */
.wishlist-icon-container {
    position: relative;
    display: inline-block;
}

.wishlist-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    position: relative;
    transition: background 0.2s ease;
}

.wishlist-link:hover {
    background: #333;
}

.wishlist-link svg {
    width: 24px;
    height: 24px;
}

.wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e31c25;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #fff;
}

.wishlist-count.hidden {
    display: none;
}

/* Overlay background */
.wishlist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.wishlist-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Slide-out panel */
.wishlist-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.wishlist-panel.active {
    transform: translateX(0);
}

/* Panel header */
.wishlist-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e5e5e5;
    background: #f9f9f9;
}

.wishlist-panel-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wishlist-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: color 0.2s ease;
}

.wishlist-close-btn:hover {
    color: #000;
}

.wishlist-panel-title h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
}

.wishlist-reset-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.wishlist-reset-btn:hover {
    background-color: var(--primary-color);
}

/* Panel content */
.wishlist-panel-content {
    flex: 1;
    padding: 2rem;
}

.wishlist-empty-state {
    text-align: center;
    padding: 2rem 0;
}

.wishlist-empty-message {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.wishlist-empty-message strong {
    color: #000;
}

/* Where to buy section */
.wishlist-where-to-buy {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 4px;
    text-align: center;
}

.wishlist-where-to-buy-btn {
    display: inline-block;
    background-color: var(--wp--preset--color--accent-8);
    color: #fff;
    padding: 1rem 3rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 1rem;
    transition: background 0.2s ease;
    letter-spacing: 1px;
}

.wishlist-where-to-buy-btn:hover {
    background-color: var(--primary-color);
}

.wishlist-where-to-buy-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* Wishlist items list */
.wishlist-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wishlist-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.wishlist-item-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.wishlist-item-details {
    flex: 1;
}

.wishlist-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 0.5rem 0;
}

.wishlist-item-title a {
    color: #000;
    text-decoration: none;
}

.wishlist-item-title a:hover {
    text-decoration: underline;
}

.wishlist-item-sku {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.5rem;
}

.wishlist-item-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.wishlist-item-remove:hover {
    color: #e31c25;
}

/* Responsive */
@media (max-width: 768px) {
    .wishlist-panel {
        width: 100vw;
        max-width: 100vw;
    }

    .wishlist-panel-header {
        padding: 1rem;
    }

    .wishlist-panel-content {
        padding: 1rem;
    }

    .wishlist-where-to-buy {
        padding: 1.5rem 1rem;
    }
}
