/*
YITH Wishlist Premium
*/

@import '../config';
@import '../mixins';
@import '../direction';

// YITH Wishlist Popup
.yith-wcwl-popup-form {
    padding-top: 1rem;
    .heading-icon {
        line-height: 1;
    }
    input[type=text], 
    select {
        padding: 10px 15px;
    }
    .wishlist-select {
        max-width: 100%;
    }
    .yith-wcwl-popup-footer {
        margin-bottom: 0;
        text-align: center;
        .popup_button {
            display: inline-block;
            padding: 1rem 3rem;
            background: #222;
            color: #fff;
            text-transform: uppercase;
            font-weight: 600;
            border-radius: 3px;
            &:hover {
                background: #333;
            }
        }
    }
}
// YITH Wishlist Dropdown
.yith-wcwl-add-to-wishlist {
    .yith-wcwl-add-button.with-dropdown {
        padding: 0;
        .yith-wcwl-dropdown {
            top: 100%;
            margin-top: 0;
            padding: .5rem 2rem;
            min-width: 160px;
            .add_to_wishlist {
                display: inline-block;
                &:before {
                    content: none;
                }
            }
            li {
                padding: 1rem 0;
                &:before {
                    margin-#{$right}: 5px;
                }
            }
        }
    }
}
// Product Loop
.product-loop {
    .btn-product-icon.yith-wcwl-add-to-wishlist {
        .yith-wcwl-dropdown {
            right: 0;
            z-index: 1;
            a {
                color: inherit;
            }
        }
        .yith-wcwl-tooltip {
            left: 50% !important;
            transform: translateX(-50%);
            text-indent: 0;
            &:before {
                left: calc(50% - 4px);
            }
        }
        .yith-wcwl-add-button.with-dropdown {
            .yith-wcwl-dropdown {
                li {
                    display: flex;
                    align-items: center;
                    padding: 5px 0;
                    color: #222;
                    text-align: #{$left};
                    line-height: 1.5;
                    &:hover {
                        color: var(--rio-primary-color);
                    }
                }
            }
        }
        .feedback {
            display: none;
        }
    }
    .product-media {
        .btn-product-icon.yith-wcwl-add-to-wishlist {
            position: relative;
            overflow: visible;
            .yith-wcwl-add-button > a {
                position: static;
                display: block;
                width: 34px;
                height: 34px;
                border-radius: 50%;
                overflow: hidden;
            }
            .d-loading {
                border-radius: 50%;
                overflow: hidden;
            }
        }
    }
    .product-details {
        > .btn-product-icon.yith-wcwl-add-to-wishlist {
            .yith-wcwl-add-button > a {
                text-indent: -9999px;

            }
            .yith-wcwl-tooltip {
                text-indent: 0;
            }
        }
    }
    .product-details .product-action {
        .btn-product-icon.yith-wcwl-add-to-wishlist {
            position: relative;
            overflow: visible;

            .yith-wcwl-add-button > a {
                display: inline-block;
                text-indent: -9999px;
                overflow: hidden;
            }
        }
        .yith-wcwl-dropdown {
            top: auto;
            bottom: 100%;
            left: 0;
            right: auto;
            z-index: 10;
        }
    }
    &.content-right .product-details .product-action {
        .btn-product-icon.yith-wcwl-add-to-wishlist {
            .yith-wcwl-add-button > a {
                text-align: left;
            }
        }
    }
}

.summary {
    .view-wishlist,
    .delete_item,
    .move_to_another_wishlist {
        display: inline-flex;
    }
    .view-wishlist {
        margin-#{$left}: 5px;
    }
}

// Feedback Popup
.yith-wcwl-popup-feedback {
    margin-top: 2rem;
    margin-bottom: 1rem;
    p.feedback {
        margin-top: 1.5rem;
        margin-bottom: 0;
        font-size: 2rem;
    }
    .after-links {
        margin-bottom: 0;
        font-size: 1.4rem;
    }
}

// Wishlist Page
.back-to-all-wishlists {
    margin-bottom: 2rem;
}
.yith_wcwl_wishlist_footer {
    margin-top: 2rem;
    .yith-wcwl-share {
        margin-top: 0;
    }
}
.wishlist-page-links {
    margin-top: 2rem;
    > a {
        &.active {
            text-decoration: underline;
        }
    }
}
.wishlist-privacy-radio {
    label {
        &:not(:last-child) {
            margin-#{$right}: 1rem;
        }
    }
}
.yith_wcwl_footer_additional_action {
    margin-#{$left}: auto;
    > a {
        vertical-align: middle;
    }
}

// Search Page
.yith-wcwl-wishlist-search-form {
    margin-bottom: 2rem;
    height: 48px;
    input {
        min-height: 48px;
        border-#{$right}: 0;
        border-radius: side-values( 3px 0 0 3px );
    }
    .wishlist-search-button {
        min-height: 48px;
        min-width: 48px;
        padding: 0;
        font-size: 17px;
        border-radius: side-values( 0 3px 3px 0 );
    }
}
.wishlist_search {
    .yith-wcwl-search-result {
        .thumb {
            display: inline-block;
            margin-#{$right}: 10px;
        }
        @include mq(sm, max) {
            font-size: 12px;
        }
    }
    thead th {
        padding: .75rem 0;
        font-size: 12px;
        line-height: 1.5;
    }
}

// Wishlist Manage Table
.wishlist_manage_table {
    &.mobile {
        .label {
            width: 20%;
        }
        td.label,
        td.value {
            padding: 10px;
        }
        .wishlist-delete {
            font-size: 18px;
        }
        .item-details-table {
            tr:last-child {
                td {
                    text-align: center;
                }
            }
        }
    }
}