/* Shared language dropdown (landing + legal). Uses <details>; flags are SVG assets. */

.care-lang-switch-host {
    position: relative;
}

.care-lang-switch {
    position: relative;
}

.care-lang-switch__summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--care-text-muted, #6b7785);
    border: 1px solid transparent;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.care-lang-switch__summary::-webkit-details-marker {
    display: none;
}

.care-lang-switch__summary::marker {
    display: none;
}

.care-lang-switch__summary:hover {
    background: rgba(29, 78, 216, 0.08);
    border-color: rgba(29, 78, 216, 0.2);
    color: #1d4ed8;
}

.care-lang-switch[open] > .care-lang-switch__summary {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
    color: var(--care-text, #1f2933);
}

.care-lang-switch__current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.care-lang-switch__flag {
    display: block;
    width: 20px;
    height: auto;
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.care-lang-switch__code {
    font-size: 11px;
    letter-spacing: 0.06em;
}

.care-lang-switch__chevron {
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-left: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -0.2em;
    opacity: 0.55;
    flex-shrink: 0;
}

.care-lang-switch[open] .care-lang-switch__chevron {
    transform: rotate(-135deg);
    margin-top: 0.12em;
}

.care-lang-switch__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 11rem;
    padding: 6px;
    margin: 0;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    z-index: 50;
}

.care-lang-switch__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.care-lang-switch__list li {
    margin: 0;
}

.care-lang-switch__opt {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}

a.care-lang-switch__opt:hover {
    background: rgba(29, 78, 216, 0.08);
    color: #1d4ed8;
}

.care-lang-switch__opt--current {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
    cursor: default;
}

.care-lang-switch__opt .care-lang-switch__flag {
    width: 22px;
}

.care-lang-switch__check {
    margin-left: auto;
    width: 0.45em;
    height: 0.75em;
    border: solid #64748b;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 0.15em;
    flex-shrink: 0;
}

/* Legal toolbar: tighter, matches slate palette */
.care-legal-body .care-lang-switch__summary {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
    color: #475569;
}

.care-legal-body .care-lang-switch__summary:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.care-legal-body .care-lang-switch[open] > .care-lang-switch__summary {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.care-legal-body .care-lang-switch__panel {
    border-color: #d8e2ec;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.care-legal-body .care-lang-switch__code {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}
