/*
 * Cinegear - YITH Wishlist / Flatsome overrides
 * Update-safe replacement for edits previously appended directly to
 * Flatsome's inc/integrations/wc-yith-wishlist/wishlist.css.
 *
 * Selectors that were overly broad in the old customization are now
 * scoped to YITH wishlist markup to avoid affecting unrelated products.
 */

.yith-wcwl-icon-svg {
    width: 16px !important;
    height: 16px !important;
}

#yith-wcwl-form .wishlist-name a {
    font-weight: 500;
}

#yith-wcwl-form .wishlist-delete a.button {
    font-size: 10px !important;
    padding: 2px 7px !important;
    min-width: 50px !important;
    border-radius: 4px !important;
    background-color: #222 !important;
    color: #fff !important;
    text-transform: uppercase !important;
}

@media screen and (min-width: 769px) {
    #yith-wcwl-form .wishlist-item-count,
    #yith-wcwl-form .wishlist-dateadded,
    #yith-wcwl-form .wishlist-delete {
        vertical-align: middle !important;
        text-align: center !important;
    }
}

@media screen and (max-width: 768px) {
    #yith-wcwl-form .wishlist-name {
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
    }

    #yith-wcwl-form .wishlist-name a.show-title-form {
        font-size: 14px !important;
    }

    #yith-wcwl-form .wishlist-privacy {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: 100% !important;
    }

    #yith-wcwl-form .wishlist-privacy .label {
        white-space: nowrap !important;
        font-weight: bold !important;
        min-width: 90px !important;
    }

    #yith-wcwl-form .wishlist-privacy .value select {
        width: 140px !important;
        font-size: 12px !important;
        height: 30px !important;
        padding: 2px 5px !important;
        text-align: center !important;
    }

    .wishlist_table.mobile .wishlist-item {
        display: flex;
        align-items: center;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        margin-bottom: 10px;
    }

    .wishlist_table.mobile .wishlist-item-wrapper {
        display: flex;
        align-items: center;
        width: 100%;
        position: relative;
    }

    .wishlist_table.mobile .product-thumbnail {
        flex: 0 0 80px;
        margin-right: 10px;
    }

    .rtl .wishlist_table.mobile .product-thumbnail {
        margin-right: 0;
        margin-left: 10px;
    }

    .wishlist_table.mobile .product-thumbnail img {
        max-height: 80px;
        object-fit: contain;
    }

    .wishlist_table.mobile .item-details {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
        min-width: 0;
    }

    .wishlist_table.mobile .top-info {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .wishlist_table.mobile .product-name {
        font-size: 14px;
        font-weight: bold;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
        min-width: 0;
    }

    .wishlist_table.mobile .product-name a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wishlist_table.mobile .item-details-table td {
        padding: 2px 0;
        white-space: nowrap;
    }
}

@media screen and (min-width: 1025px) {
    ul.wishlist_table.modern_grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px !important;
        list-style: none !important;
        padding: 0 !important;
    }

    ul.wishlist_table.modern_grid > li {
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #ddd !important;
        padding: 10px !important;
        border-radius: 6px !important;
        background: #fff !important;
    }

    ul.wishlist_table.modern_grid .product-thumbnail img {
        max-height: 300px !important;
        object-fit: contain !important;
        border-radius: 4px !important;
    }
}

@media screen and (max-width: 1024px) and (min-width: 769px) {
    ul.wishlist_table.modern_grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
        list-style: none !important;
        padding: 0 !important;
    }

    ul.wishlist_table.modern_grid > li {
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #ddd !important;
        padding: 10px !important;
        border-radius: 6px !important;
        background: #fff !important;
    }

    ul.wishlist_table.modern_grid .product-thumbnail img {
        max-height: 300px !important;
        object-fit: contain !important;
        border-radius: 4px !important;
    }
}
