/* SWL Frontend Styling - Premium Isolated CSS */

.swl-wishlist-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 0;
    width: auto;
}

.swl-wishlist-button:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

/* Button on product image loop */
.swl-loop-wishlist-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    width: 38px !important;
    height: 38px !important;
    background: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    z-index: 99 !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    padding: 0 !important;
}

/* Specific theme compatibility */
.product-small .box-image .swl-loop-wishlist-btn,
.image-fade_in_back .swl-loop-wishlist-btn,
.product-box .swl-loop-wishlist-btn {
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
}

.swl-loop-wishlist-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18) !important;
}

.swl-loop-wishlist-btn .swl-icon {
    width: 20px !important;
    height: 20px !important;
    margin-bottom: 0 !important;
}

.swl-count-badge-loop {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background: #4f46e5 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
    line-height: 1 !important;
}

.swl-added .swl-count-badge-loop {
    color: #4f46e5 !important;
}

/* Modal Popup Styles */
#swl-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

#swl-popup-content {
    background: #fff;
    width: 90%;
    max-width: 420px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
    animation: swlFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes swlFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.swl-popup-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.swl-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

#swl-popup-close {
    cursor: pointer;
    font-size: 28px;
    color: #9ca3af;
    line-height: 1;
    transition: color 0.2s;
}
#swl-popup-close:hover { color: #111827; }

.swl-popup-body {
    padding: 30px 24px;
    text-align: center;
}

.swl-success-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 16px;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.swl-success-check {
    width: 44px;
    height: 44px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -35px auto 15px;
    position: relative;
    border: 3px solid #fff;
}

.swl-popup-body p {
    margin: 0;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
}

/* List Popup Styles */
.swl-wishlist-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 0 24px;
}

.swl-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.swl-list-item:last-child { border-bottom: none; }

.swl-item-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.swl-item-info {
    flex: 1;
    text-align: left;
}

.swl-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2px;
    display: block;
    text-decoration: none !important;
}

.swl-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #4f46e5;
}

.swl-item-atc {
    background: #4f46e5;
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.swl-item-atc:hover {
    background: #4338ca;
    transform: translateY(-1px);
}
.swl-item-atc:disabled {
    cursor: not-allowed;
}

.swl-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.swl-item-remove {
    background: #fee2e2;
    color: #ef4444 !important;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s;
    flex-shrink: 0;
}

.swl-item-remove:hover {
    background: #fecaca;
    transform: rotate(90deg);
}

.swl-popup-footer {
    padding: 20px 24px;
    background: #f9fafb;
    display: flex;
    gap: 15px; /* Increased gap */
}

.swl-popup-btn {
    flex: 1;
    padding: 0 15px;
    border-radius: 14px; /* Slightly more rounded */
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    white-space: nowrap; /* Prevent text wrapping */
    display: flex;
    align-items: center;
    justify-content: center;
}

.swl-btn-view { 
    background: #4f46e5; 
    color: #fff !important; 
    height: 54px; /* Slightly taller for more presence */
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}
.swl-btn-view:hover { background: #4338ca; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35); }

.swl-btn-cont { 
    background: #ffffff; 
    color: #334155 !important; 
    border: 1px solid #e2e8f0;
    height: 54px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.swl-btn-cont:hover { 
    background: #f8fafc; 
    border-color: #cbd5e1;
    color: #0f172a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.swl-icon {
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="%234f46e5"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z" /></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
}

.swl-count-badge {
    background: #4f46e5;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    min-width: 15px;
    text-align: center;
}

.swl-count-badge-loop {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4f46e5;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.swl-added .swl-icon, .swl-loop-wishlist-btn.swl-added .swl-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%234f46e5" viewBox="0 0 24 24" stroke="%234f46e5"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z" /></svg>') !important;
}
