.dte-switcher {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dte-switcher__item {
    margin: 0;
}

.dte-switcher__link {
    align-items: center;
    color: #4b5563;
    display: inline-flex;
    gap: 10px;
    text-decoration: none;
}

.dte-switcher__flag {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    line-height: 1;
    min-width: 18px;
}

.dte-switcher__flag img {
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    display: block;
    height: 12px;
    width: 18px;
}

.dte-switcher__name {
    white-space: nowrap;
}

.dte-floating-switcher {
    bottom: 18px;
    position: fixed;
    right: 18px;
    z-index: 9999;
}

.dte-floating-switcher__label {
    display: none;
}

.dte-floating-switcher__toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    justify-content: center;
    min-width: 170px;
    padding: 12px 16px;
    transition: box-shadow 0.2s ease;
}

.dte-floating-switcher__toggle:hover,
.dte-floating-switcher__toggle:focus {
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16), 0 3px 8px rgba(15, 23, 42, 0.1);
    outline: none;
}

.dte-floating-switcher__chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    display: inline-block;
    flex: 0 0 auto;
    height: 8px;
    margin-left: 2px;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    width: 8px;
}

.dte-floating-switcher.is-open .dte-floating-switcher__chevron,
.dte-floating-switcher:focus-within .dte-floating-switcher__chevron {
    transform: rotate(225deg);
}

.dte-floating-switcher__panel {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    bottom: calc(100% + 10px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.08);
    min-width: 170px;
    opacity: 0;
    padding: 10px;
    pointer-events: none;
    position: absolute;
    right: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    visibility: hidden;
    width: max-content;
}

.dte-floating-switcher.is-open .dte-floating-switcher__panel,
.dte-floating-switcher:focus-within .dte-floating-switcher__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.dte-floating-switcher .dte-switcher {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dte-floating-switcher .dte-switcher__link {
    background: transparent;
    border: 0;
    border-radius: 12px;
    box-sizing: border-box;
    color: #4b5563;
    display: flex;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    min-width: 170px;
    padding: 12px 14px;
    transition: background-color 0.15s ease, color 0.15s ease;
    width: 100%;
}

.dte-floating-switcher .dte-switcher__link:hover,
.dte-floating-switcher .dte-switcher__link:focus {
    background: #f3f4f6;
    color: #374151;
    outline: none;
}

.dte-floating-switcher .dte-switcher__item.is-current .dte-switcher__link {
    background: #f8fafc;
    color: #1f2937;
    font-weight: 600;
}

@media (hover: none), (max-width: 640px) {
    .dte-floating-switcher {
        bottom: auto;
        right: -40px;
        top: 50svh;
        transform: translateY(-50%);
    }

    .dte-floating-switcher__toggle {
        border-radius: 16px 16px 0 0;
        gap: 8px;
        min-width: 0;
        padding: 8px 12px;
        transform: rotate(-90deg);
        transform-origin: center center;
    }

    .dte-floating-switcher__toggle .dte-switcher__name {
        font-size: 14px;
        line-height: 1;
    }

    .dte-floating-switcher__toggle .dte-switcher__flag img {
        height: 11px;
        width: 16px;
    }

    .dte-floating-switcher__chevron {
        display: none;
    }

    .dte-floating-switcher__panel {
        bottom: auto;
        max-height: min(240px, calc(100svh - 32px));
        max-width: min(200px, calc(100vw - 84px));
        min-width: 168px;
        overflow-y: auto;
        right: 56px;
        top: 50%;
        transform: translateY(-50%) translateX(6px) scale(0.98);
        width: auto;
    }

    .dte-floating-switcher.is-open .dte-floating-switcher__panel,
    .dte-floating-switcher:focus-within .dte-floating-switcher__panel {
        transform: translateY(-50%) translateX(0) scale(1);
    }

    .dte-floating-switcher .dte-switcher__link {
        font-size: 14px;
        min-width: 0;
    }
}
