/* Floating language switch, bottom left (Shared/Layout/LanguageSwitch.razor, wwwroot/js/site-language.js). */
.dn-lang {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1500;          /* above the page, below the film dialog (2000) */
    font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
}

.dn-lang-btn,
.dn-lang-menu button {
    -webkit-tap-highlight-color: transparent;
    font: inherit;
    cursor: pointer;
}

.dn-lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px 0 10px;
    border: 0;
    border-radius: 20px;
    background: rgba(29, 36, 48, 0.78);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    transition: background 0.15s;
}

.dn-lang-btn:hover,
.dn-lang-btn[aria-expanded="true"] { background: rgba(29, 36, 48, 0.94); }

.dn-lang-btn:focus-visible,
.dn-lang-menu button:focus-visible {
    outline: 3px solid #FEC601;
    outline-offset: 2px;
}

.dn-lang-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    flex: none;
    display: block;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);   /* keeps the white US stripes from melting into light backgrounds */
}

.dn-lang-menu {
    position: absolute;
    left: 0;
    bottom: 48px;
    display: grid;
    gap: 2px;
    min-width: 156px;
    padding: 6px;
    border-radius: 12px;
    background: rgba(29, 36, 48, 0.96);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.dn-lang-menu[hidden] { display: none; }

/* A fixed flag column, started at the left edge, so flags and names line up in every row and every browser
   (Firefox otherwise centres a button's content). */
.dn-lang-menu button {
    display: grid;
    grid-template-columns: 24px auto;
    justify-content: start;
    justify-items: start;
    align-items: center;
    column-gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
    text-align: left;
}

.dn-lang-menu button:hover { background: rgba(255, 255, 255, 0.1); }

.dn-lang-menu button[aria-checked="true"] {
    background: rgba(255, 255, 255, 0.16);
    font-weight: 600;
}

@media (max-width: 600px) {
    .dn-lang { left: 12px; bottom: 12px; }
    .dn-lang-btn { height: 36px; padding: 0 10px 0 8px; }
}

@media print {
    .dn-lang { display: none; }
}
