/**
 * Wishlist Styles
 * Styling for wishlist buttons, notifications, and header icon
 */

/* ========================================
   WISHLIST BUTTON
   ======================================== */

.wishlist-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    width: 100%;
}

.wishlist-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.wishlist-btn.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #ef4444;
    color: #ffffff;
}

.wishlist-btn.active:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.wishlist-btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.wishlist-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wishlistSpin 0.6s linear infinite;
}

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

/* Wishlist icon */
.wishlist-btn .wishlist-icon {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.wishlist-btn.active .wishlist-icon {
    fill: currentColor;
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
}

/* ========================================
   HEADER WISHLIST ICON
   ======================================== */

.wishlist-header-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 10px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wishlist-header-icon:hover {
    color: #00d4ff;
    transform: translateY(-2px);
}

.wishlist-header-icon .wishlist-icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.wishlist-header-icon:hover .wishlist-icon {
    fill: currentColor;
}

/* Counter badge */
.wishlist-counter {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 10px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wishlist-counter.has-items {
    opacity: 1;
    transform: scale(1);
}

/* Pulse animation for counter */
@keyframes counterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.wishlist-counter.has-items {
    animation: counterPulse 0.5s ease;
}

/* ========================================
   WISHLIST NOTIFICATIONS
   ======================================== */

.wishlist-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    min-width: 280px;
    max-width: 400px;
    padding: 16px 20px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.wishlist-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.wishlist-notification.success {
    border-color: rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.1));
}

.wishlist-notification.error {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
}

.wishlist-notification.info {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
}

.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

.wishlist-notification.success .notification-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.wishlist-notification.error .notification-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.wishlist-notification.info .notification-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   SINGLE PRODUCT PAGE - WISHLIST BUTTON
   ======================================== */

.single-product .wishlist-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
}

/* Product Actions Layout - Horizontal */
.single-product .product-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    width: 100%;
}

.single-product .product-actions .button {
    flex: 1;
    margin: 0;
}

/* ========================================
   FLOATING WISHLIST BUTTON
   ======================================== */

.floating-wishlist-btn {
    position: fixed;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
    text-decoration: none;
    color: #ffffff;
}

.floating-wishlist-btn:hover {
    transform: translateY(-50%) translateX(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.6);
}

.floating-wishlist-btn i {
    font-size: 24px;
    color: #ffffff;
}

.floating-wishlist-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #ffffff;
    color: #ef4444;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Pulse animation for floating button */
@keyframes floatingPulse {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.05); }
}

.floating-wishlist-btn {
    animation: floatingPulse 2s ease-in-out infinite;
}

.floating-wishlist-btn:hover {
    animation: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wishlist-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    .wishlist-header-icon {
        width: 36px;
        height: 36px;
        margin: 0 5px;
    }

    .wishlist-header-icon .wishlist-icon {
        width: 20px;
        height: 20px;
    }

    .floating-wishlist-btn {
        top: 50%;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .floating-wishlist-btn i {
        font-size: 22px;
    }

    .floating-wishlist-btn:hover {
        transform: translateY(-50%) translateX(-4px) scale(1.05);
    }
}

/* ========================================
   WISHLIST PAGE STYLES
   ======================================== */

.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist {
    padding: 20px 0;
}

.the7-wishlist {
    max-width: 1290px;
    margin: 0 auto;
}

.the7-wishlist h2 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.empty-wishlist {
    text-align: center;
    padding: 80px 20px;
    background: #1a1a2e;
    border: 1px solid #2d2d45;
    border-radius: 12px;
}

.empty-wishlist p {
    color: #9ca3af;
    margin-bottom: 24px;
    font-size: 18px;
}

.empty-wishlist .button {
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.empty-wishlist .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.wishlist-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wishlist-grid .custom-product-card {
    list-style: none;
}

/* Responsive */
@media (max-width: 768px) {
    .wishlist-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 16px !important;
    }

    .the7-wishlist h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .wishlist-grid {
        grid-template-columns: 1fr !important;
    }

    .empty-wishlist {
        padding: 60px 20px;
    }
}

.the7-wishlist .empty-wishlist {
    text-align: center;
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.the7-wishlist .empty-wishlist p {
    font-size: 18px;
    color: #9ca3af;
    margin-bottom: 24px;
}

.the7-wishlist .empty-wishlist .button {
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.the7-wishlist .empty-wishlist .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* Wishlist grid */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .wishlist-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Remove from wishlist button on wishlist page */
.wishlist-page .wishlist-btn.remove-from-wishlist {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.wishlist-page .wishlist-btn.remove-from-wishlist:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* ========================================
   ACCOUNT WISHLIST PAGE - WHITE TEXT
   ======================================== */

/* Make all text white in account wishlist page */
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist * {
    color: #ffffff !important;
}

/* Headings */
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist h1,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist h2,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist h3,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist h4,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist h5,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist h6 {
    color: #ffffff !important;
}

/* Paragraphs and text */
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist p,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist span,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist div,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist td,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist th,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist label {
    color: #ffffff !important;
}

/* Links */
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist a {
    color: #00d4ff !important;
    text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist a:hover {
    color: #00a8cc !important;
}

/* Empty wishlist text */
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .empty-wishlist h3 {
    color: #ffffff !important;
}

.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .empty-wishlist p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Table styles if using table layout */
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .wishlist-table {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .wishlist-table th,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .wishlist-table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Product cards */
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .custom-product-card {
    background: rgba(42, 45, 58, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .product-title,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .product-name {
    color: #ffffff !important;
}

.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .price,
.woocommerce-account .woocommerce-MyAccount-content .the7-wishlist .amount {
    color: #00d4ff !important;
}

/* ========================================
   GUEST WISHLIST PAGE (/favourite/)
   ======================================== */

/* Guest notice styling */
.the7-wishlist .wishlist-guest-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    margin-bottom: 2rem;
    color: #ffffff;
}

.the7-wishlist .wishlist-guest-notice .notice-icon {
    flex-shrink: 0;
    color: #00d4ff;
}

.the7-wishlist .wishlist-guest-notice a {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.the7-wishlist .wishlist-guest-notice a:hover {
    color: #00a8cc;
    text-decoration: underline;
}

/* Loading spinner */
.the7-wishlist .wishlist-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
}

.the7-wishlist .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.the7-wishlist .wishlist-loading p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Wishlist table container */
.the7-wishlist .wishlist-table-container {
    width: 100%;
    overflow-x: auto;
    background: rgba(42, 45, 58, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Wishlist table */
.the7-wishlist .wishlist-table {
    width: 100%;
    border-collapse: collapse;
}

.the7-wishlist .wishlist-table thead {
    background: rgba(55, 58, 73, 0.5);
}

.the7-wishlist .wishlist-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.the7-wishlist .wishlist-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.the7-wishlist .wishlist-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.the7-wishlist .wishlist-table td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
}

/* Image column */
.the7-wishlist .wishlist-td-image {
    width: 120px;
}

.the7-wishlist .wishlist-product-remove-wrapper {
    position: relative;
    display: inline-block;
}

.the7-wishlist .wishlist-remove-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 59, 48, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
}

.the7-wishlist .wishlist-remove-btn:hover {
    background: #ff4444;
    color: #ffffff;
    transform: scale(1.1);
}

.the7-wishlist .wishlist-image-link {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.the7-wishlist .wishlist-product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product name column */
.the7-wishlist .wishlist-td-name {
    min-width: 250px;
}

.the7-wishlist .wishlist-product-name {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.the7-wishlist .wishlist-product-name:hover {
    color: #00d4ff !important;
}

/* Category column */
.the7-wishlist .wishlist-td-category {
    min-width: 150px;
}

.the7-wishlist .wishlist-category-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #a78bfa !important;
}

/* Price column */
.the7-wishlist .wishlist-td-price {
    min-width: 100px;
}

.the7-wishlist .wishlist-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff !important;
}

/* Action column */
.the7-wishlist .wishlist-td-action {
    min-width: 140px;
}

.the7-wishlist .wishlist-action-btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: #ffffff !important;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.the7-wishlist .wishlist-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

/* Make sure all white text for /favourite/ page */
.the7-wishlist,
.the7-wishlist * {
    color: #ffffff !important;
}

.the7-wishlist h2 {
    color: #ffffff !important;
    margin-bottom: 2rem;
}

.the7-wishlist a:not(.button):not(.product-view-btn) {
    color: #00d4ff !important;
}

.the7-wishlist a:not(.button):not(.product-view-btn):hover {
    color: #00a8cc !important;
}

/* Empty wishlist */
.the7-wishlist .empty-wishlist {
    text-align: center;
    padding: 4rem 2rem;
}

.the7-wishlist .empty-wishlist p {
    color: rgba(255, 255, 255, 0.7) !important;
    margin-bottom: 2rem;
}

.the7-wishlist .empty-wishlist .button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.the7-wishlist .empty-wishlist .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .the7-wishlist .wishlist-guest-notice {
        flex-direction: column;
        text-align: center;
    }

    .the7-wishlist .wishlist-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .the7-wishlist .wishlist-table {
        min-width: 600px;
    }

    .the7-wishlist .wishlist-table th,
    .the7-wishlist .wishlist-table td {
        padding: 0.75rem 1rem;
    }

    .the7-wishlist .wishlist-td-image {
        width: 80px;
    }

    .the7-wishlist .wishlist-image-link {
        width: 70px;
        height: 70px;
    }
}
