/* Shared by the app and blog, including pages that use the Tailwind CDN. */
.footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-language-switcher { max-inline-size: 100%; }
.footer-language-picker { position: relative; }

.footer-language-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-sizing: border-box;
    min-block-size: 44px;
    min-inline-size: 8.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border-default);
    border-radius: 8px;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.5;
    list-style: none;
    cursor: pointer;
    box-shadow: none;
}

.footer-language-trigger::-webkit-details-marker { display: none; }
.footer-language-trigger::marker { content: ''; }
.footer-language-trigger:hover,
.footer-language-picker[open] > .footer-language-trigger {
    background: var(--color-bg-subtle);
    color: var(--color-text-heading);
}

.footer-language-trigger:focus { outline: none; }
.footer-language-trigger:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
}

.footer-language-trigger svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    pointer-events: none;
}

.footer-language-chevron { margin-inline-start: auto; }
.footer-language-picker[open] .footer-language-chevron { transform: rotate(180deg); }

.footer-language-menu {
    /* Native disclosure + form works without JS. JS fits this same panel to
       the viewport, so even a partially visible footer cannot clip it. */
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: min(17rem, calc(100vw - 2rem));
    max-height: min(24rem, calc(100dvh - 6rem));
    padding: 0.375rem;
    border: 1px solid var(--color-border-default);
    border-radius: 12px;
    background: var(--color-bg-subtle);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.28);
    color: var(--color-text-body);
    text-align: start;
}

.footer-language-heading {
    flex: none;
    padding: 0.5rem 0.75rem 0.625rem;
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
}

.footer-language-options {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-default) transparent;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: start;
    cursor: pointer;
}

.footer-language-option:hover,
.footer-language-option[aria-current="true"] {
    background: var(--color-bg-muted);
    color: var(--color-text-heading);
}

.footer-language-option:focus { outline: none; }
.footer-language-option:focus-visible {
    background: var(--color-bg-muted);
    outline: 2px solid var(--color-primary-light);
    outline-offset: -2px;
}

.footer-language-check {
    flex: none;
    width: 1rem;
    height: 1rem;
    color: var(--color-primary-light);
    visibility: hidden;
}
.footer-language-option[aria-current="true"] .footer-language-check { visibility: visible; }

@media (min-width: 768px) {
    .footer-meta { justify-content: flex-end; }
    .footer-language-menu { left: auto; right: 0; transform: none; }
}
