/**
 * sim-wishlist-styles.css
 * Styling for the Wish List button and My Account page.
 */

/* -------------------------------------------
   A. WISH LIST BUTTON STYLING (Requirement 2)
   ------------------------------------------- */

/*
.sim-wishlist-button {
    background: none;
    border: none;
    padding: 0;
    margin-left: 10px; 
    cursor: pointer;
    font-size: 1.5em; 
    line-height: 1;
    transition: color 0.2s, opacity 0.2s;
    display: inline-flex;
    align-items: center;
    text-shadow: 0 0 1px rgba(0,0,0,0.1);
}

ul.products .sim-wishlist-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0 10px 16px 0;
    cursor: pointer;
    font-size: 1.5em;
    transition: color 0.2s, opacity 0.2s;
    text-shadow: 0 0 1px rgba(0,0,0,0.1);
}
*/

.sim-wishlist-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0 10px 16px 0;
    cursor: pointer;
    font-size: 1.5em;
    transition: color 0.2s, opacity 0.2s;
    text-shadow: 0 0 1px rgba(0,0,0,0.1);
}

/* Hover effect */
.sim-wishlist-button:hover,
.sim-wishlist-button:focus {
    outline: none;
}

/* Icon (Heart Symbol) Styling */
.sim-wishlist-button .sim-heart-icon {
    display: inline-block;
    color: #999; /* Default color (empty heart) */
}

/* State: Highlight when product IS in the wish list */
.sim-wishlist-button.in-wishlist .sim-heart-icon,
.sim-wishlist-button:hover .sim-heart-filled {
    color: #e30000; /* Red color for filled/highlighted heart */
}

/* Styling for the 'loading' state during AJAX */
.sim-wishlist-button.loading {
    opacity: 0.5;
    cursor: wait;
}

/* -------------------------------------------
   B. MY ACCOUNT PAGE STYLING (Requirement 4 & 3)
   ------------------------------------------- */

/* Style the custom Wish List menu item */
.woocommerce-MyAccount-navigation-link.wish-list a {
    font-weight: bold;
    color: #0073aa; 
}

/* Wish List Content Layout */
.sim-wishlist-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sim-wishlist-list li {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.sim-wishlist-list li img {
    margin-right: 15px;
    max-width: 60px; 
    height: auto;
    border-radius: 4px;
}

.sim-wishlist-list li div {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align left */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.sim-wishlist-list li h3 {
    margin: 0;
    font-size: 1.1em;
    flex-basis: 30%; /* Take up some dedicated space */
    min-width: 150px;
}

.sim-wishlist-list li p {
    margin: 0 20px;
    font-weight: bold;
}

/* Styling for the REMOVE button on the Wish List page */
.woocommerce-account .sim-wishlist-button {
    font-size: 0.9em;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #333;
    margin-left: auto; /* Push to the right */
    margin-right: 20px;
    width: auto;
}

.woocommerce-account .sim-wishlist-button:hover {
    background-color: #fce8e8;
    border-color: #e30000;
}

.woocommerce-account .sim-wishlist-button .sim-heart-icon {
    margin-right: 5px;
    font-size: 1.2em;
    color: #e30000; 
}

/* Edit */

.sim-heart-icon img {
    filter: drop-shadow(0px -1px 0px rgba(221, 46, 68, 0.5))
            drop-shadow(0px 1px 0px rgba(221, 46, 68, 0.5))
            drop-shadow(1px 0px 0px rgba(221, 46, 68, 0.5))
            drop-shadow(-1px 0px 0px rgba(221, 46, 68, 0.5));
}
body.archive .sim-heart-icon img,
body.home .sim-heart-icon img {
    width: auto !important;
    height: 28px !important;
    margin-bottom: -6px !important;
}
body.single-product .entry-summary .sim-wishlist-button {
    padding: 0 !important;
    margin: 24px 0 0 15px;
    background: none !important;
}
body.single-product .entry-summary .sim-wishlist-button::after {
    display: none;
}
body.single-product .entry-summary .sim-heart-icon img {
    height: 28px !important;
    width: auto !important;
}
body.single-product .entry-summary .loading .sim-heart-icon {
    cursor: wait;
}

/* Styling for the centralized Wish List Link Button */
.sim-wishlist-link-button {
    display: block;
}

/* Icon (optional, use a FontAwesome heart if available, or Unicode) */
.sim-wishlist-link-button .sim-wishlist-icon {
    font-size: 1.1em;
    margin-right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styling for the count badge */
.sim-wishlist-count {
    font-size: 12px;
    position: absolute;
    top: -10px;
    right: -10px;
    background: #0256a1;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    min-width: 20px;
    text-align: center;
    height: 20px;
    line-height: 20px;
    color: #fff;
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.5);
}

/* Highlight the count when the list has items */
.sim-wishlist-link-button.has-items .sim-wishlist-count {
    background-color: #f9641d; /* Red for emphasis */
}

/* Change icon color when empty */
.sim-wishlist-link-button.is-empty .sim-wishlist-icon {
    color: #999;
}
.sim-wishlist-link-button.is-empty .sim-wishlist-count {
    display: none;
}

/* Change icon color when it has items (filled heart emoji if you use unicode) */
.sim-wishlist-link-button.has-items .sim-wishlist-icon {
    content: "❤️"; /* You may need to change the PHP output to a filled heart */
    color: #e30000;
}