/**
 * Public styles for JG Wishlist
 */

.jgw-wishlist-buttons {
    margin: 20px 0;
}

.jgw-add-to-wishlist,
.jgw-view-wishlist {
    margin-right: 10px;
}

.jgw-back-in-stock {
    margin-top: 10px;
    display: block;
}

.jgw-wishlist-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.jgw-wishlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.jgw-wishlist-header .jgw-wishlist-title {
    margin: 0;
}

.jgw-remove-all,
.jgw-remove-item,
.jgw-add-to-wishlist,
.jgw-view-wishlist {
    cursor: pointer !important;
}

.jgw-remove-all {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.jgw-remove-all:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

.jgw-remove-item {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.jgw-remove-item:hover {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
}

.jgw-wishlist-items {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.jgw-wishlist-item {
    border: 1px solid #ddd;
    padding: 15px;
    background: #fff;
}

.jgw-item-image img {
    width: 100%;
    height: auto;
}

.jgw-item-details h3 {
    margin-top: 10px;
    margin-bottom: 5px;
}

.jgw-item-actions {
    margin-top: 15px;
}

.jgw-item-actions .button {
    margin-right: 10px;
}

.jgw-quote-form-container {
    margin-top: 40px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}

.jgw-quote-form p {
    margin-bottom: 15px;
}

.jgw-quote-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.jgw-quote-form input[type="text"],
.jgw-quote-form input[type="email"],
.jgw-quote-form input[type="tel"] {
    width: 100%;
    max-width: 400px;
    padding: 8px;
}

/* Modal */
.jgw-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.jgw-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.jgw-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.jgw-modal-close:hover {
    color: #000;
}

.jgw-posts-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.jgw-post-item {
    border: 1px solid #ddd;
    padding: 15px;
    background: #fff;
}

.jgw-post-image img {
    width: 100%;
    height: auto;
}

/* Product Loop Wishlist Button */
.jgw-wishlist-button-loop {
    margin-top: 10px;
    text-align: center;
}

.jgw-wishlist-button-loop .button {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

/* Loading state */
.jgw-add-to-wishlist.jgw-loading {
    opacity: 0.6;
    cursor: wait;
}

/* Added state with tick animation */
.jgw-added {
    background-color: #46a74e !important;
    border-color: #46a74e !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 1 !important;
}

.jgw-tick {
    display: inline-block;
    vertical-align: middle;
}

.jgw-tick-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: jgw-draw-tick 0.5s ease forwards;
}

@keyframes jgw-draw-tick {
    to {
        stroke-dashoffset: 0;
    }
}

/* Stock status badges */
.jgw-in-stock {
    color: #46a74e;
    font-weight: 600;
}

.jgw-out-of-stock {
    color: #dc3545;
    font-weight: 600;
}

/* DataTables overrides for wishlist table */
#jgw-wishlist-table img {
    max-width: 80px;
    height: auto;
}

#jgw-wishlist-table td {
    vertical-align: middle;
}

#jgw-wishlist-table .jgw-item-actions {
    white-space: nowrap;
    text-align: center;
    margin-top: 0;
}

#jgw-wishlist-table .jgw-item-actions .button {
    margin: 2px;
}

/* Success/Error messages */
.jgw-success-message {
    color: #46a74e;
    font-weight: 600;
    padding: 15px;
    text-align: center;
    background: rgba(70, 167, 78, 0.1);
    border-radius: 4px;
}

.jgw-error-message {
    color: #dc3545;
    font-weight: 600;
    padding: 10px;
    margin-bottom: 15px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
}

/* Loading state for all buttons */
.jgw-loading {
    opacity: 0.6;
    cursor: wait;
    pointer-events: none;
}


