/* Lines-limit-guard: 500 */

/**
 * Wamia Mobile Header Icons Enhancement
 * Improves mobile UX by making wishlist and cart icons equal in size and larger for better touch targets
 */

/* ========================================
   MOBILE ACTION ICONS - BASE STYLING
   ======================================== */

/* Mobile header action links - Base container */
.mobile-action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;  /* Exceeds 44px minimum for iOS/Android */
    min-height: 48px;
    padding: 12px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4D4D4D; /* neutral-700 */
    text-decoration: none;
    position: relative;
}

/* Mobile action icon container - Equal sizing for all icons */
.mobile-action-icon-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;  /* Larger than default 24px for better visibility */
    height: 28px;
}

/* Mobile action icons - Consistent sizing */
.mobile-action-icon {
    width: 28px !important;  /* Override any existing smaller sizes */
    height: 28px !important;
    display: block;
    stroke-width: 2;
    color: inherit;
}

/* ========================================
   MOBILE ACTION COUNTERS - EQUAL CIRCLES
   ======================================== */

/* Badge count circles - Wishlist and Cart equal sizing */
.badge-count,
.badge-count.wishlist-counter,
.badge-count.cart-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;   /* Smaller size for better visual balance */
    min-height: 18px;
    width: 18px;       /* Fixed width for perfect circles */
    height: 18px;      /* Fixed height for perfect circles */
    padding: 0;        /* Remove padding to maintain perfect circle */
    background-color: #ED6F26; /* Primary brand color */
    color: #FFFFFF;
    font-size: 11px;   /* Adjusted font for smaller circle */
    font-weight: 700;  /* Bolder for better contrast */
    line-height: 1;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* Subtle shadow for depth */
    z-index: 10;
}

/* Counter number styling - Works with nested font elements */
.badge-count .counter-number,
.badge-count font {
    display: block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: inherit;
}

/* ========================================
   MOBILE TOUCH STATES & INTERACTION
   ======================================== */

/* Hover states for mobile action links */
.mobile-action-link:hover {
    background-color: #F9F9F9; /* neutral-200 */
    color: #ED6F26; /* primary-500 */
    transform: translateY(-1px); /* Subtle lift effect */
}

/* Focus states for accessibility */
.mobile-action-link:focus {
    outline: 2px solid #ED6F26;
    outline-offset: 2px;
    background-color: #F9F9F9;
}

/* Active states */
.mobile-action-link:active {
    background-color: #EEEEEE; /* neutral-300 */
    transform: scale(0.98);
}

/* Counter hover effects */
.mobile-wishlist-link:hover .badge-count.wishlist-counter,
.mobile-cart-link:hover .badge-count.cart-counter,
.mobile-cart-link:hover .badge-count.counter.qty {
    background-color: #F88D46; /* primary-400 */
    transform: scale(1.05);
    transition: all 0.2s ease-in-out;
}

/* ========================================
   SPECIFIC MOBILE ICON IMPROVEMENTS
   ======================================== */

/* Wishlist icon specific adjustments */
.mobile-wishlist-link .mobile-action-icon.icon-wishlist {
    stroke-width: 2.5; /* Slightly thicker for heart icon visibility */
}

/* Cart icon specific adjustments */
.mobile-cart-link .mobile-action-icon.icon-cart {
    stroke-width: 2.5; /* Consistent with wishlist */
}

/* Search icon (product pages) */
.mobile-search-link .mobile-action-icon.icon-search {
    stroke-width: 2.5; /* Consistent stroke weight */
}

/* Login/Account icon */
.mobile-login-link .mobile-action-icon.icon-login {
    stroke-width: 2.5; /* Consistent stroke weight */
}

/* ========================================
   USER ACTIONS CONTAINER LAYOUT
   ======================================== */

/* Mobile user actions container - Proper spacing */
.mobile-user-actions {
    display: flex;
    align-items: center;
    gap: 4px; /* Reduced gap to accommodate larger icons */
    padding: 0 8px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Extra small screens (phones in portrait) */
@media (max-width: 375px) {
    .mobile-action-link {
        min-width: 44px;  /* Minimum 44px for very small screens */
        min-height: 44px;
        padding: 10px;
    }
    
    .mobile-action-icon-container {
        width: 26px;
        height: 26px;
    }
    
    .mobile-action-icon {
        width: 26px !important;
        height: 26px !important;
    }
    
    .mobile-user-actions {
        gap: 2px; /* Tighter spacing on very small screens */
    }
}

/* Large mobile screens (phones in landscape, small tablets) */
@media (min-width: 481px) and (max-width: 768px) {
    .mobile-action-link {
        min-width: 52px;  /* Larger touch targets on bigger mobile screens */
        min-height: 52px;
        padding: 14px;
    }
    
    .mobile-action-icon-container {
        width: 30px;
        height: 30px;
    }
    
    .mobile-action-icon {
        width: 30px !important;
        height: 30px !important;
    }
    
    .badge-count,
    .badge-count.wishlist-counter,
    .badge-count.cart-counter {
        min-width: 24px;
        min-height: 24px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .badge-count,
    .badge-count.wishlist-counter,
    .badge-count.cart-counter {
        border-width: 3px;
        font-weight: 800;
        background-color: #D65E1D; /* Darker primary for better contrast */
    }
    
    .mobile-action-link {
        border: 2px solid transparent;
    }
    
    .mobile-action-link:focus {
        border-color: #ED6F26;
        outline: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .mobile-action-link,
    .badge-count,
    .badge-count.wishlist-counter,
    .badge-count.cart-counter {
        transition: none;
    }
    
    .mobile-action-link:hover {
        transform: none;
    }
    
    .mobile-action-link:active {
        transform: none;
    }
}

/* ========================================
   RTL SUPPORT
   ======================================== */

/* RTL layout adjustments */
[dir="rtl"] .badge-count,
[dir="rtl"] .badge-count.wishlist-counter,
[dir="rtl"] .badge-count.cart-counter {
    right: auto;
    left: -8px;
}

/* ========================================
   HIDE COUNTER WHEN EMPTY
   ======================================== */

/* Hide counters when they have no items (maintains Magento/Codazon pattern) */
.badge-count.empty,
.badge-count.wishlist-counter.empty,
.badge-count.cart-counter.empty,
.badge-count.counter.qty.empty {
    display: none !important;
}

/* Show counters when they have content */
.badge-count:not(.empty),
.badge-count.wishlist-counter:not(.empty),
.badge-count.cart-counter:not(.empty),
.badge-count.counter.qty:not(.empty) {
    display: flex !important;
} 