/**
 * Cart Widget Styles
 * Styling for the marketplace cart widget component
 */

.cart-widget {
    display: inline-block;
}

.cart-link {
    display: inline-flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.cart-link:hover {
    color: inherit;
    text-decoration: none;
}

.cart-link i {
    margin-right: 5px;
    font-size: inherit; /* Match the text size */
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    line-height: 14px;
    text-align: center;
}

.cart-text {
    margin-left: 2px;
}

/* Mobile responsiveness */
@media screen and (max-width: 640px) {
    .cart-widget {
        margin-left: 10px;
    }
    
    .cart-link {
        padding: 5px;
    }
    
    .cart-count {
        top: -5px;
        right: -2px;
    }
}

/* Mobile menu cart styling */
.cart-count-mobile {
    color: #ffc107;
    font-weight: bold;
    font-size: 0.9em;
}

/* Navigation responsiveness fixes */
/* Prevent navigation wrapping on intermediate screen sizes */

/* First level optimization for larger intermediate screens */
@media (max-width: 1200px) and (min-width: 1061px) {
    #navigation ul.dropdown.menu {
        padding: 0 8px; /* Reduce padding between nav items */
        font-size: 14px; /* Slightly smaller nav text */
    }
    
    #actions-container {
        padding: 0 8px 0 0; /* Reduce right padding */
    }
    
    .small-text {
        font-size: 12px; /* Smaller action text */
    }
    
    /* Reduce search input width slightly */
    #marketplace-search {
        width: 280px;
    }
}

/* Second level optimization for tighter screens */
@media (max-width: 1140px) and (min-width: 1061px) {
    #navigation ul.dropdown.menu {
        padding: 0 6px; /* Further reduce padding */
    }
    
    .small-text {
        font-size: 11px; /* Smaller text */
    }
    
    /* Reduce search input width further */
    #marketplace-search {
        width: 240px;
    }
}

/* Third level - hide less critical items on very tight intermediate screens */
@media (max-width: 1100px) and (min-width: 1061px) {
    /* Hide Advertise link when space is tight - it's the 4th menu item */
    #navigation ul.dropdown.menu.d-inline.d-mobile-none:nth-of-type(4) {
        display: none;
    }
    
    /* Make remaining items even more compact */
    #navigation ul.dropdown.menu {
        padding: 0 4px;
    }
}

/* Mobile navigation spacing fixes */
@media (max-width: 1060px) {
    #nav-pad {
        padding-top: 60px !important; /* Reduce excessive mobile whitespace */
    }
    
    #main-navigation {
        height: 60px !important; /* Match reduced padding */
    }
}

/* For very small screens, reduce further */
@media (max-width: 640px) {
    #nav-pad {
        padding-top: 50px !important;
    }
    
    #main-navigation {
        height: 50px !important;
    }
}