/**
 * Fab Header Icons — Cart & Account
 *
 * @package FabUI
 */

/* ==========================================================================
   Icons Container — sits inside #top-menu as last child
   ========================================================================== */

#fab-header-icons {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
    margin-left: 12px;
    vertical-align: middle;
    list-style: none;
    padding: 0;
    float: none !important;
}

/* ==========================================================================
   Individual Icon
   ========================================================================== */

/* Override Divi's #top-menu a { display: block } */
#top-menu .fab-header-icon,
.fab-header-icon {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
    padding: 0 !important;
}

#top-menu .fab-header-icon:hover,
.fab-header-icon:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

.fab-header-icon svg {
    display: block;
    pointer-events: none;
}

/* ==========================================================================
   Cart Count Badge
   ========================================================================== */

.fab-cart-count {
    position: absolute;
    top: 1px;
    right: -1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #fff;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.fab-cart-count--visible {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   Wholesale Badge
   ========================================================================== */

.fab-wholesale-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    margin-right: 6px;
    background: #7c3aed;
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    border-radius: 20px;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

/* Desktop: show full text, hide short */
.fab-wholesale-badge__short {
    display: none;
}

.fab-wholesale-badge__full {
    display: inline;
}

/* ==========================================================================
   Hide default Divi cart
   ========================================================================== */

#et-top-navigation .et-cart-info {
    display: none !important;
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 980px) {
    /* On mobile the icons live inside #main-header (always visible) */
    #main-header {
        position: relative;
    }

    #fab-header-icons {
        position: absolute;
        top: 50%;
        right: 80px;
        transform: translateY(-50%);
        z-index: 99999;
        margin-left: 0;
    }

    .fab-header-icon {
        width: 34px;
        height: 34px;
    }

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

    /* Wholesale badge: compact circle with "WS" */
    .fab-wholesale-badge {
        width: 34px;
        height: 34px;
        padding: 0;
        margin-right: 0;
        border-radius: 50%;
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .fab-wholesale-badge__full {
        display: none;
    }

    .fab-wholesale-badge__short {
        display: inline;
    }
}
