/**
 * Cross-website store switcher — shared across all demo themes.
 * Uses CSS custom properties (--switcher-*) overridable by each theme.
 */

/* ---- Wrapper ---- */
.switcher-all-stores {
    float: right;
    margin-left: 15px;
    position: relative;
    font-size: 13px;
    line-height: 22px;
}

/* ---- Trigger ---- */
.switcher-all-stores .switcher-trigger {
    cursor: pointer;
    white-space: nowrap;
    display: inline-block;
    padding: 0;
}

/* Override Luma's clip:rect that hides the span */
.switcher-all-stores .switcher-trigger > span {
    border: 0 !important;
    clip: unset !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    position: static !important;
    width: auto !important;
    color: inherit;
}

/* Chevron via Luma icon font */
.switcher-all-stores .switcher-trigger:after {
    -webkit-font-smoothing: antialiased;
    font-size: 10px;
    line-height: 22px;
    color: inherit;
    content: '\e622';
    font-family: 'luma-icons';
    margin: 0 0 0 5px;
    vertical-align: top;
    display: inline-block;
    font-weight: normal;
    speak: none;
}

.switcher-all-stores .switcher-trigger.active:after {
    content: '\e621';
}

/* ---- Dropdown ---- */
/* Override Luma's .lib-dropdown() mixin that forces background: #fff */
.switcher-all-stores .switcher-dropdown,
.switcher-all-stores ul.dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin: 2px 0 0;
    min-width: 280px;
    background: var(--switcher-dropdown-bg, #f5f5f5) !important;
    color: var(--switcher-dropdown-color, #333) !important;
    border: 1px solid var(--switcher-dropdown-border, #ddd) !important;
    border-radius: 2px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    padding: 6px 0;
    z-index: 1000;
    list-style: none;
}

/* ---- Group header (brand) ---- */
.switcher-all-stores .switcher-group-header {
    padding: 12px 18px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--switcher-group-color, #888);
    border-top: 1px solid var(--switcher-separator, #e0e0e0);
}

.switcher-all-stores .switcher-group-header:first-child {
    border-top: none;
    padding-top: 8px;
}

/* ---- Store item ---- */
.switcher-all-stores .switcher-store-item {
    padding: 0;
}

.switcher-all-stores .switcher-store-item a,
.switcher-all-stores .switcher-store-item > span {
    display: block;
    padding: 9px 18px 9px 34px;
    color: var(--switcher-item-color, #333);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.switcher-all-stores .switcher-store-item a:hover {
    background: var(--switcher-hover-bg, #eee);
    color: var(--switcher-hover-color, #000);
}

/* Active store */
.switcher-all-stores .switcher-store-item.current > span {
    font-weight: 600;
    color: var(--switcher-active-color, #000);
    position: relative;
}

.switcher-all-stores .switcher-store-item.current > span:before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    background: var(--switcher-active-color, #000);
    border-radius: 50%;
}
