/**
 * Wishlist Page Styles
 * AMEYZE Shop - Wunschliste mit Card-Design
 * 
 * Farbpalette:
 * - Primary: #7f4d5a
 * - Secondary: #d8a9b4  
 * - Light: #fff9f9
 * - Background: #ffffff
 */

/* Debug Info
   ========================================================================== */
.wishlist-debug-info {
    background-color: #fff9f9;
    border: 1px solid #d8a9b4;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #666;
}

/* Page Title
   ========================================================================== */
.wishlist-page-section .page-title {
    color: #7f4d5a;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.wishlist-page-section .page-title i {
    color: #d8a9b4;
}

/* Remove Button
   ========================================================================== */
.btn-remove-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(127, 77, 90, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #7f4d5a;
}

.btn-remove-wishlist:hover {
    background: var(--ameyze-bg-light);
    box-shadow: 0 4px 12px rgba(127, 77, 90, 0.2);
    color: #dc3545;
    transform: scale(1.1);
    border-color: #dc3545;
}

.btn-remove-wishlist i {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (min-width: 576px) {
    .btn-remove-wishlist {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }

    .btn-remove-wishlist i {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .wishlist-page-section .page-title {
        gap: 0.4rem;
    }

    .btn-remove-wishlist i {
        font-size: 0.95rem;
    }
}

/* Empty Wishlist
   ========================================================================== */
.empty-wishlist-message {
    padding: 4rem 0;
}

.empty-wishlist-icon {
    font-size: 5rem;
    color: #d8a9b4;
    margin-bottom: 1.5rem;
}

.empty-wishlist-icon i {
    display: block;
}

.empty-wishlist-message h3 {
    color: #7f4d5a;
    font-weight: 600;
}

.empty-wishlist-message .text-muted {
    color: #999;
}

.empty-wishlist-message .btn-primary {
    background-color: #7f4d5a;
    border-color: #7f4d5a;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-wishlist-message .btn-primary:hover {
    background-color: #5a3640;
    border-color: #5a3640;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 77, 90, 0.25);
}

/* Recently Removed Section
   ========================================================================== */
.recently-removed-section {
    border-top: 2px solid #fff9f9;
    padding-top: 3rem;
}

.section-title {
    color: #7f4d5a;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block; /* Ensure underline matches text width */
}

.section-title i {
    color: #d8a9b4;
}

/* Removed Item Card
   ========================================================================== */
.removed-item-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.removed-item-card:hover {
    box-shadow: 0 4px 12px rgba(127, 77, 90, 0.08);
    border-color: #d8a9b4;
}

.item-info h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Re-add Button
   ========================================================================== */
.btn-re-add {
    border-color: #d8a9b4;
    color: #7f4d5a;
    white-space: nowrap;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-re-add:hover {
    background: #7f4d5a;
    border-color: #7f4d5a;
    color: #fff;
    transform: translateY(-1px);
}

/* Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .removed-item-card {
        margin-bottom: 1rem;
    }
}

/* Loading State
   ========================================================================== */
/* Note: .wishlist-product-card.loading and .btn-add-to-cart.loading
   are now in components/product-card.css */

.btn-remove-wishlist.loading,
.btn-re-add.loading {
    position: relative;
    color: transparent;
}

.btn-remove-wishlist.loading::after,
.btn-re-add.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

.btn-re-add.loading::after {
    border-color: #7f4d5a;
    border-top-color: transparent;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Success Animation
   ========================================================================== */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

.wishlist-product-card.removing {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Tooltip Styling */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background: #7f4d5a;
    padding: 8px 12px;
    border-radius: 6px;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #7f4d5a;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #7f4d5a;
}

.tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: #7f4d5a;
}

.tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #7f4d5a;
}

/* Toast Notification Images
   ========================================================================== */
.wishlist-toast-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.wishlist-toast-placeholder {
    width: 60px;
    height: 60px;
}

/* Skeleton/Loading States
   ========================================================================== */
.wishlist-skeleton-img {
    width: 100%;
    height: 200px;
}

.wishlist-skeleton-icon {
    font-size: 3rem;
}

/* Animation States
   ========================================================================== */
.wishlist-item-col {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wishlist-item-enter {
    opacity: 0;
    transform: translateY(20px);
}

/* Print Styles */
@media print {
    .btn,
    .btn-group,
    .wishlist-debug-info,
    .recently-removed-section {
        display: none;
    }

    .wishlist-product-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
