/**
 * File Name: frontend-wishlist-widget.css
 * File Location: /assets/css/frontend-wishlist-widget.css
 *
 * Purpose:
 * Styles the DAF Marketplace header wishlist dropdown widget, wishlist badge,
 * mini product list, sticky dropdown action buttons, remove actions, empty state,
 * and toast UI. Shows 3 products in dropdown front view; remaining products scroll.
 *
 * Linked Files:
 * - /includes/frontend/class-frontend-wishlist-widget.php
 * - /assets/js/frontend-wishlist-widget.js
 * - /includes/frontend/class-frontend-wishlist-page.php
 * - /assets/css/frontend-wishlist-page.css
 */

/* ==========================================================================
   DAF Wishlist Widget - Parent Wrapper
   ========================================================================== */

.daf-wishlist-nav-item {
    position: relative !important;
    overflow: visible !important;
    display: inline-block !important;
}

.daf-wishlist-trigger-wrapper {
    margin-left: 8px !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
}

.daf-wishlist-trigger {
    position: relative !important;
    z-index: 5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.daf-header-wl-icon {
    width: 22px !important;
    height: 22px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    object-fit: contain !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Badge
   ========================================================================== */

.daf-wl-count-badge {
    position: absolute !important;
    top: 5px !important;
    right: -9px !important;
    background: #8cc63f !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    min-width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
    padding: 0 !important;
    line-height: 1 !important;
    z-index: 10 !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Dropdown Container
   ========================================================================== */

.daf-ghost-wishlist-widget {
    all: initial;
    display: block !important;
    position: absolute !important;
    top: 135% !important;
    right: 0 !important;
    width: 390px !important;
    max-width: calc(100vw - 24px) !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 24px 42px -12px rgba(15, 23, 42, 0.22), 0 10px 18px -12px rgba(15, 23, 42, 0.16) !important;
    border-radius: 14px !important;
    z-index: 999999999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(12px) !important;
    transition: all 0.22s ease !important;
    pointer-events: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.daf-wishlist-active .daf-ghost-wishlist-widget,
.daf-wishlist-nav-item.is-active .daf-ghost-wishlist-widget {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Header
   ========================================================================== */

.daf-dropdown-header {
    padding: 16px 18px !important;
    border-bottom: 1px solid #eef2f7 !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    box-sizing: border-box !important;
}

.daf-dropdown-title {
    font-weight: 900 !important;
    font-size: 14px !important;
    color: #0f172a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: block !important;
    line-height: 1.2 !important;
}

.daf-dropdown-subtitle {
    margin-top: 4px !important;
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    line-height: 1.2 !important;
}

.daf-dropdown-view-link {
    color: #2271b1 !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Body Layout
   ========================================================================== */

.daf-dropdown-body {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* 3 products visible, remaining products scroll */
.daf-wl-widget-scroll {
    max-height: 246px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

.daf-wl-widget-scroll::-webkit-scrollbar {
    width: 7px !important;
}

.daf-wl-widget-scroll::-webkit-scrollbar-track {
    background: #f8fafc !important;
}

.daf-wl-widget-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 999px !important;
}

.daf-wl-widget-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

.daf-wl-widget-products {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Product Item
   ========================================================================== */

.daf-wl-widget-item {
    min-height: 82px !important;
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) 34px !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

.daf-wl-widget-item:hover {
    background: #fbfdff !important;
}

.daf-wl-widget-item:last-child {
    border-bottom: none !important;
}

.daf-wl-widget-thumb {
    width: 72px !important;
    height: 54px !important;
    display: block !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    background: #f1f5f9 !important;
    border: 1px solid #eef2f7 !important;
    box-sizing: border-box !important;
}

.daf-wl-widget-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

.daf-wl-widget-info {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
}

.daf-wl-widget-name {
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    line-height: 1.28 !important;
    text-decoration: none !important;
    white-space: normal !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

.daf-wl-widget-name:hover {
    color: #2271b1 !important;
}

.daf-wl-widget-price {
    color: #8cc63f !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Professional Remove Button
   ========================================================================== */

.daf-wl-widget-remove {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    border: 1px solid #fecaca !important;
    background: #fff7f7 !important;
    color: #ef4444 !important;
    font-size: 0 !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.08) !important;
}

.daf-wl-widget-remove span {
    font-size: 20px !important;
    line-height: 1 !important;
    transform: translateY(-1px) !important;
}

.daf-wl-widget-remove:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.22) !important;
}

.daf-wl-widget-remove:active {
    transform: translateY(0) !important;
}

/* ==========================================================================
   DAF Wishlist Widget - View More Link
   ========================================================================== */

.daf-wl-widget-more {
    display: block !important;
    text-align: center !important;
    padding: 10px 16px !important;
    border-top: 1px solid #f1f5f9 !important;
    color: #2271b1 !important;
    background: #ffffff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    flex: 0 0 auto !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Sticky Actions
   ========================================================================== */

.daf-wl-widget-actions {
    flex: 0 0 auto !important;
    position: sticky !important;
    bottom: 0 !important;
    padding: 14px 16px 16px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    z-index: 3 !important;
}

.daf-wl-widget-btn {
    height: 38px !important;
    border-radius: 8px !important;
    border: none !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 12px !important;
    line-height: 1 !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.daf-wl-widget-btn:hover {
    transform: translateY(-1px) !important;
    opacity: 0.93 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.daf-wl-widget-add-cart {
    background: #8cc63f !important;
}

.daf-wl-widget-clear {
    background: #ef4444 !important;
}

.daf-wl-widget-view {
    background: #0f172a !important;
    grid-column: 1 / -1 !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Empty / Guest State
   ========================================================================== */

.daf-wl-widget-empty {
    padding: 38px 22px !important;
    text-align: center !important;
    color: #64748b !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 9px !important;
    box-sizing: border-box !important;
}

.daf-wl-widget-empty-icon {
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    color: #8cc63f !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.daf-wl-widget-empty strong {
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 900 !important;
}

.daf-wl-widget-empty span {
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    max-width: 260px !important;
}

.daf-wl-widget-empty a {
    margin-top: 8px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Toast
   ========================================================================== */

#daf-wishlist-toast-container {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1000000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    pointer-events: none !important;
}

.daf-toast {
    background: #10b981 !important;
    color: #ffffff !important;
    padding: 14px 28px !important;
    border-radius: 50px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    min-width: 280px !important;
    opacity: 0 !important;
    transform: scale(0.8) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.daf-toast.daf-toast-visible {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.daf-toast.removed {
    background: #0f172a !important;
}

/* ==========================================================================
   DAF Wishlist Widget - Responsive
   ========================================================================== */

@media (max-width: 520px) {
    .daf-ghost-wishlist-widget {
        right: -14px !important;
        width: calc(100vw - 28px) !important;
    }

    .daf-wl-widget-actions {
        grid-template-columns: 1fr !important;
    }

    .daf-wl-widget-view {
        grid-column: auto !important;
    }
}