/* Language toggle shared styles.
 * Wrap language-specific fragments with [lang="en"] or [lang="he"] on any element.
 * Default state: English visible, Hebrew hidden. When <html> has class "lang-he":
 * Hebrew visible (display reverts to the element's natural value), English hidden, RTL enabled.
 */

/* Default: Hebrew hidden (scoped to body descendants — avoid hiding <html>) */
body [lang="he"] { display: none; }

/* When Hebrew is active: flip */
.lang-he body [lang="en"] { display: none; }
.lang-he body [lang="he"] { display: revert; }

/* RTL direction when Hebrew active */
.lang-he {
    direction: rtl;
}
.lang-he body,
.lang-he .legal-document,
.lang-he .legal-section,
.lang-he .legal-header,
.lang-he .legal-footer,
.lang-he ul,
.lang-he ol {
    direction: rtl;
    text-align: right;
}
.lang-he .brand-header {
    flex-direction: row-reverse;
}

/* Toggle button (injected by lang-toggle.js) */
.lang-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    gap: 0.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    font-family: Inter, system-ui, sans-serif;
    font-size: 0.875rem;
}

.lang-toggle button {
    background: transparent;
    border: 0;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    color: #4a5568;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}

.lang-toggle button.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.lang-toggle button:not(.active):hover {
    background: #edf2f7;
}

.lang-he .lang-toggle {
    right: auto;
    left: 1rem;
}
