/* Language menu (Views/Shared/_LanguageSwitcher.cshtml). */
.pg-lang {
    position: relative;
    display: inline-block;
    font-size: 0.82rem;
    line-height: 1.2;
    z-index: 1040;
}

.pg-lang__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
    white-space: nowrap;
}

.pg-lang__toggle::-webkit-details-marker { display: none; }
.pg-lang__toggle::marker { content: ""; }
.pg-lang__toggle:hover,
.pg-lang[open] .pg-lang__toggle { border-color: #94a3b8; background: #f8fafc; }
.pg-lang__toggle:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

.pg-lang__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 170px;
    padding: 0.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.pg-lang__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 7px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
}

.pg-lang__item small { color: #64748b; font-size: 0.74rem; }
.pg-lang__item .bi-check2 { margin-left: auto; color: #2563eb; }
.pg-lang__item:hover,
.pg-lang__item:focus-visible { background: #f1f5f9; color: #0f172a; outline: none; }
.pg-lang__item.is-current { background: #eff6ff; }

/* Standalone pages: bottom-left corner (toasts use the bottom-right), menu opens upwards. */
.pg-lang--floating {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 1990;
}

.pg-lang--floating .pg-lang__menu {
    left: 0;
    right: auto;
    top: auto;
    bottom: calc(100% + 6px);
}

.pg-lang--floating .pg-lang__toggle { box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12); }

@media (max-width: 575.98px) {
    .pg-lang__current { display: none; }
    .pg-lang__toggle { padding: 0.38rem 0.5rem; }
}
