/* ═══════════════════════════════════════════════
   LEN Multilingua — Language Switcher CSS
   ═══════════════════════════════════════════════ */

/* ── Dropdown ─────────────────────────────────── */
.lm-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lm-switcher--dropdown .lm-switcher__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--lencustom-text, #1a1a1a);
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
    line-height: 1;
}

.lm-switcher--dropdown .lm-switcher__toggle:hover {
    border-color: rgba(0,0,0,0.35);
    background: rgba(0,0,0,0.04);
}

.lm-switcher__chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}
.lm-switcher--dropdown.is-open .lm-switcher__chevron {
    transform: rotate(180deg);
}

.lm-switcher__flag {
    font-size: 16px;
    line-height: 1;
}

.lm-switcher__current-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ── Dropdown menu ───────────────────────────── */
.lm-switcher--dropdown .lm-switcher__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 6px;
    list-style: none;
    margin: 0;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s, transform 0.15s;
}

.lm-switcher--dropdown.is-open .lm-switcher__menu {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.lm-switcher--dropdown .lm-switcher__menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lm-switcher__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.1s;
    cursor: pointer;
}

.lm-switcher__option:hover,
.lm-switcher__option:focus-visible {
    background: #f3f4f6;
    outline: none;
}

.lm-switcher__option--current {
    background: #f0f9ff;
    color: #0369a1;
    cursor: default;
}

.lm-switcher__lang-name {
    flex: 1;
}

/* ── List style (footer) ─────────────────────── */
.lm-switcher--list {
    display: block;
}

.lm-switcher__list-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin: 0 0 8px;
}

.lm-switcher__list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.lm-switcher__list li {
    list-style: none;
}

.lm-switcher--list .lm-switcher__option {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    gap: 6px;
}

.lm-switcher--list .lm-switcher__option:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* ── Footer lang switcher (dark background) ─────────────────────── */
.footer-lang-switcher {
    margin-top: 12px;
}

.footer-lang-switcher .lm-switcher__list-title {
    color: rgba(255,255,255,0.5);
}

.footer-lang-switcher .lm-switcher--list .lm-switcher__option {
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.2);
    background: transparent;
}

.footer-lang-switcher .lm-switcher--list .lm-switcher__option:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

.footer-lang-switcher .lm-switcher--list .lm-switcher__option--current {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
}

/* ── RTL override per lo switcher ───────────── */
[dir="rtl"] .lm-switcher--dropdown .lm-switcher__menu {
    right: auto;
    left: 0;
}

/* ── Dark theme ──────────────────────────────── */
.site-footer .lm-switcher--dropdown .lm-switcher__toggle {
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}

.site-footer .lm-switcher--dropdown .lm-switcher__toggle:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.08);
}

/* ═══════════════════════════════════════════════
   Shipping badge — pagina prodotto
   ═══════════════════════════════════════════════ */
.lm-shipping-badge {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    margin: 12px 0;
}
.lm-shipping-badge__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #166534;
}
.lm-shipping-badge__item--free {
    color: #15803d;
    font-weight: 600;
}
.lm-shipping-badge svg { flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   Shipping notice — carrello e checkout
   ═══════════════════════════════════════════════ */
.lm-shipping-notice {
    position: relative;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    margin-bottom: 16px;
    overflow: hidden;
}
.lm-shipping-notice__bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: var(--pct, 0%);
    background: linear-gradient(90deg, #3b82f6, #10b981);
    transition: width 0.4s ease;
    border-radius: 0 2px 2px 0;
}
.lm-shipping-notice__text {
    font-size: 13px;
    color: #1e40af;
}
.lm-shipping-notice__text strong { color: #1d4ed8; }

[dir="rtl"] .lm-shipping-notice__bar {
    left: auto;
    right: 0;
    border-radius: 2px 0 0 2px;
}
[dir="rtl"] .lm-shipping-badge { align-items: flex-end; }

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 767px) {
    .lm-switcher--dropdown .lm-switcher__toggle {
        padding: 5px 8px;
    }
    .lm-switcher__current-label {
        display: none;
    }
    .lm-switcher--dropdown .lm-switcher__menu {
        right: -8px;
    }
}
