/* Button Styles */

.ow-wishlist-btn.added {
    color: #e2264d;
    border-color: #e2264d;
}

.ow-wishlist-btn .ow-icon {
    font-size: 18px;
    line-height: 1;
}

.ow-wishlist-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Wishlist Page Styles */
.ow-wishlist-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.ow-wishlist-view-header h2 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: left;
    color: #333;
}

.ow-wishlist-items-view {
    border: 1px solid #eee;
    background: #fff;
    margin-bottom: 30px;
}

.ow-wishlist-items-view .ow-wishlist-item-row {
    border-bottom: 1px solid #eee;
}

.ow-wishlist-items-view .ow-wishlist-item-row:last-child {
    border-bottom: none;
}

.ow-wishlist-items-view .ow-wishlist-item-row:nth-child(even) {
    background: #f9f9f9;
}

.ow-wishlist-action-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 150px;
}

.ow-out-of-stock {
    color: #999;
    font-size: 13px;
}

/* Share Section */
.ow-wishlist-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
}

.ow-share-label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

.ow-share-input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    max-width: 400px;
    flex: 1;
}

.ow-share-url {
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    color: #999;
    flex: 1;
    background: transparent;
    outline: none;
}

.ow-share-copy-btn {
    background: #222;
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.ow-share-copy-btn:hover {
    background: #444;
}

.ow-wishlist-pagination {
    margin-top: 20px;
    text-align: center;
}

.ow-wishlist-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #eee;
    margin: 0 4px;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s;
}

.ow-wishlist-pagination .page-numbers:hover,
.ow-wishlist-pagination .page-numbers.current {
    background: #222;
    color: #fff;
    border-color: #222;
}


/* Popup Styles */
#ow-wishlist-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
}

#ow-wishlist-popup-container.pos-center {
    justify-content: center;
    align-items: center;
}

#ow-wishlist-popup-container.pos-left {
    justify-content: flex-start;
    align-items: stretch;
}

#ow-wishlist-popup-container.pos-right {
    justify-content: flex-end;
    align-items: stretch;
}

.ow-wishlist-popup {
    background: #fff;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
    transition: transform 0.3s ease;
}

/* Sidebar behavior for Left/Right */
.pos-left .ow-wishlist-popup,
.pos-right .ow-wishlist-popup {
    max-width: 450px;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
}

/* Animations for sliding in */
.pos-left .ow-wishlist-popup {
    transform: translateX(-100%);
    animation: ow-slide-left 0.3s forwards;
}

.pos-right .ow-wishlist-popup {
    transform: translateX(100%);
    animation: ow-slide-right 0.3s forwards;
}

@keyframes ow-slide-left {
    to {
        transform: translateX(0);
    }
}

@keyframes ow-slide-right {
    to {
        transform: translateX(0);
    }
}

/* Transparent overlay that covers the backdrop area — click to close */
.ow-wishlist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 0;
}

.ow-wishlist-popup-content {
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

/* Push footer to bottom in sidebar mode */
.pos-left .ow-wishlist-popup-content,
.pos-right .ow-wishlist-popup-content {
    height: 100%;
}

.ow-wishlist-header {
    background: #222;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.ow-wishlist-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    text-transform: uppercase;
}

.ow-wishlist-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.ow-wishlist-items {
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
    background: #fff;
    flex: 1;
}

.ow-wishlist-items ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ow-wishlist-item-row {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    gap: 15px;
    position: relative;
}

.ow-wishlist-remove-wrap {
    flex: 0 0 20px;
}

.ow-wishlist-remove-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
}

.ow-wishlist-remove-btn:hover {
    color: #e2264d;
}

.ow-wishlist-image {
    flex: 0 0 70px;
}

.ow-wishlist-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.ow-wishlist-details {
    flex: 1;
}

.ow-product-title {
    margin: 0 0 5px;
    font-size: 14px;
    line-height: 1.3;
}

.ow-product-title a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.ow-product-meta {
    font-size: 13px;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ow-price {
    color: #333;
    font-weight: bold;
}

.ow-wishlist-popup-content {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    position: relative;
}

.ow-wishlist-notification-area {
    position: absolute;
    bottom: 0;
    /* Overlay the footer */
    left: 0;
    width: 100%;
    z-index: 50;
    pointer-events: none;
}

.ow-wishlist-notification {
    padding: 18px 20px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #62bb6f;
    display: none;
    /* jQuery handles visibility */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    min-height: 58px;
    box-sizing: border-box;
    /* Prevent jerky motion with padding */
}

.ow-wishlist-notification.success {
    background-color: #62bb6f !important;
}

.ow-wishlist-notification.remove {
    background-color: #e53935 !important;
}

.ow-wishlist-notification.visible {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.ow-wishlist-footer {
    padding: 20px;
    border-top: 2px solid #f5f5f5;
    background: #fff;
    flex-shrink: 0;
}

.ow-wishlist-footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ow-wishlist-footer-links a {
    color: #111;
    text-decoration: underline;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ow-wishlist-footer-links a:hover {
    color: #e2264d;
}


@keyframes ow-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.ow-icon.spin {
    animation: ow-spin 1s linear infinite;
    display: inline-block;
}

/* Suggested Products in Popup */
.ow-wishlist-suggested {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.ow-wishlist-suggested h4 {
    font-size: 13px;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: #333;
    font-weight: 700;
}

.ow-suggested-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.ow-suggested-product a {
    text-decoration: none;
    display: block;
    text-align: center;
}

.ow-suggested-product img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 5px;
}

.ow-suggested-title {
    display: block;
    font-size: 11px;
    color: #333;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ow-suggested-price {
    display: block;
    font-size: 11px;
    color: #e2264d;
    font-weight: 700;
}

/* Toast Notifications */
.ow-wishlist-toast {
    position: fixed;
    z-index: 10000;
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    text-transform: uppercase;
    max-width: 350px;
}

.ow-wishlist-toast.has-image {
    padding-left: 10px;
}

.ow-toast-img {
    flex: 0 0 50px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.ow-toast-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ow-toast-content {
    flex: 1;
    line-height: 1.4;
}

.ow-wishlist-toast.success {
    background: #62bb6f;
}

.ow-wishlist-toast.error {
    background: #e2264d;
}

/* Positions */
.ow-wishlist-toast.right-top {
    top: 30px;
    right: 30px;
}

.ow-wishlist-toast.right-bottom {
    bottom: 30px;
    right: 30px;
}

.ow-wishlist-toast.left-top {
    top: 30px;
    left: 30px;
}

.ow-wishlist-toast.left-bottom {
    bottom: 30px;
    left: 30px;
}

.ow-wishlist-toast.center-top {
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.ow-wishlist-toast.center-bottom {
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 767px) {
    .ow-wishlist-toast {
        left: 20px !important;
        right: 20px !important;
        width: calc(100% - 40px);
        transform: none !important;
        text-align: center;
    }

    .ow-wishlist-toast.center-top,
    .ow-wishlist-toast.left-top,
    .ow-wishlist-toast.right-top {
        top: 20px;
    }

    .ow-wishlist-toast.center-bottom,
    .ow-wishlist-toast.left-bottom,
    .ow-wishlist-toast.right-bottom {
        bottom: 20px;
    }
}

/* Theme Compatibility for Clever Module */
.ow-wishlist-btn.woosw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    gap: 8px;
    vertical-align: middle;
    text-decoration: none !important;
    width: auto !important;
    max-width: fit-content !important;
}

.ow-wishlist-btn.woosw-btn.ow-wishlist-single {
    text-align: center;
    flex: none !important;
}

.ow-wishlist-btn.woosw-btn.ow-wishlist-loop {
    width: 45px !important;
    height: 45px !important;
    padding: 0 !important;
    border-radius: 4px;
    margin: 0 0 0 8px;
    flex: none !important;
    vertical-align: middle;
}

/* Fix for Elementor List layouts or contexts where they might wrap */
ul.products li.product .ow-wishlist-loop,
.woocommerce-product-list ul.products li.product .ow-wishlist-loop {
    display: inline-flex !important;
}

.ow-wishlist-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.2s ease;
    gap: 8px;
    vertical-align: middle;
    text-decoration: none;
}

/* Ensure 'Link' type looks like a link and not a button */
.ow-wishlist-link {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit;
    font-weight: 500;
}

.ow-wishlist-link:hover {
    color: #e2264d !important;
    background: transparent !important;
}

.ow-wishlist-link.added {
    color: #e2264d !important;
}

.ow-wishlist-btn.woosw-btn .ow-icon,
.ow-wishlist-link .ow-icon {
    margin: 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ow-wishlist-btn.woosw-btn .woosw-btn-text,
.ow-wishlist-link .woosw-btn-text {
    display: inline-block;
}