/* Darson language switcher: segmented pill with round flags.
   Shown in the desktop nav and, below lg, next to the hamburger button. */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 9999px;
    background: rgba(23, 0, 113, 0.05);
    border: 1px solid rgba(23, 0, 113, 0.08);
}

.lang-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.lang-opt:hover {
    color: #170071;
}

.lang-opt:focus-visible {
    outline: 2px solid #170071;
    outline-offset: 2px;
}

.lang-opt.is-active {
    background: #fff;
    color: #170071;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.lang-flag {
    width: 18px;
    height: 18px;
    flex: none;
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lang-opt.is-active .lang-flag,
.lang-opt:hover .lang-flag {
    opacity: 1;
}

.lang-flag svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Small phones: flags only, so the logo keeps its full size */
@media (max-width: 399px) {
    .lang-opt {
        padding: 4px;
        gap: 0;
    }
    .lang-code {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .lang-flag {
        width: 20px;
        height: 20px;
    }
}
