/* Favorites feature: heart toggle on product cards/page, trash in favorites tab, orphan list. */

/* Anchor for the absolutely-positioned heart/trash on product cards. */
.box0400 {
    position: relative;
}

/* The product .container is a grid. Firefox places an absolutely positioned grid
   item outside that block, so the heart sits on a non-grid frame around it. */
.product-wrap .favorite-frame {
    position: relative;
    width: var(--web-width);
    max-width: var(--web-container);
    margin: 0 auto;
}

.product-wrap .favorite-frame > .container {
    width: 100%;
    max-width: none;
    margin: 0;
}

.product-wrap .favorite-toggle {
    top: 0;
    right: 0;
    z-index: 3;
}

.product-wrap .product-form {
    padding-right: 48px;
}

.favorite-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--color-black) 35%, transparent);
    border-radius: var(--border-radius-sm, 50%);
    background-color: #fff;
    /* --color-gray is a 5% black wash used for surfaces, so it disappears on white. */
    color: color-mix(in srgb, var(--color-black) 55%, transparent);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.favorite-toggle:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.favorite-toggle.is-favorite {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.favorite-toggle.is-favorite i {
    font-weight: 900;
}

/* Menu rows are horizontal, so the heart is anchored to the photo, not the article. */
.menu-product__image {
    position: relative;
}

.menu-product__image .favorite-toggle {
    top: 4px;
    right: 4px;
}

/* Trash button shown only in the favorites tab (next to the heart). */
.favorite-remove {
    position: absolute;
    top: 10px;
    right: 54px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--color-black) 35%, transparent);
    border-radius: var(--border-radius-sm, 50%);
    background-color: #fff;
    color: color-mix(in srgb, var(--color-black) 55%, transparent);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.favorite-remove:hover {
    color: #d11a2a;
    border-color: #d11a2a;
}

/* Favorites tab layout */
.favorites-list .favorite-toggle {
    display: none;
}

.favorites-list .favorite-remove {
    right: 10px;
}

.favorites-list {
    min-width: 0;
}

.favorites-list .shop-wrapper {
    max-width: 100%;
    padding: 0;
}

.favorites-list .profile-header {
    margin-bottom: 16px;
}

.no-favorites {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    color: color-mix(in srgb, var(--color-black) 55%, transparent);
}

.no-favorites i {
    font-size: 48px;
}

.favorites-unavailable {
    margin-top: 30px;
}

.favorites-unavailable__title {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.favorite-orphan {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-gray);
}

.favorite-orphan__name {
    font-weight: 600;
}

.favorite-orphan__info {
    color: color-mix(in srgb, var(--color-black) 55%, transparent);
    font-size: 14px;
}

.favorite-orphan .favorite-remove {
    position: static;
    width: auto;
    padding: 6px 12px;
    gap: 6px;
    margin-left: auto;
}
