.twp-language-switcher {
    display: inline-flex;
    align-items: center;
    position: relative;
    font-family: inherit;
}

.twp-language-switcher.inline {
    gap: 15px;
}

.twp-language-switcher.twp-justify-start,
.twp-language-switcher.twp-justify-center,
.twp-language-switcher.twp-justify-end,
.twp-language-switcher.twp-justify-between {
    display: flex;
    width: 100%;
}

.twp-language-switcher.twp-justify-start {
    justify-content: flex-start;
}

.twp-language-switcher.twp-justify-center {
    justify-content: center;
}

.twp-language-switcher.twp-justify-end {
    justify-content: flex-end;
}

.twp-language-switcher.twp-justify-between {
    justify-content: space-between;
}

.twp-language-switcher.vertical {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.twp-switcher-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: inherit;
}

.twp-switcher-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.twp-switcher-item.active .twp-switcher-link {
    font-weight: 600;
}

.twp-flag {
    display: inline-block;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    min-height: 28px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50% !important;
    margin-right: 10px;
    vertical-align: middle;
    flex: 0 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.twp-switcher-link:hover .twp-flag {
    transform: scale(1.1);
}

.twp-language-switcher.dropdown {
    cursor: pointer;
}

.twp-language-switcher.dropdown:not(.twp-justify-start):not(.twp-justify-center):not(.twp-justify-end):not(.twp-justify-between) {
    width: fit-content;
}

.twp-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    padding: 6px 0px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: fit-content;
}

.twp-dropdown-trigger .twp-flag {
    margin-right: 0;
}

.twp-dropdown-trigger:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.twp-globe-icon {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    stroke-width: 1.8;
    background: #f3f3f3;
    border-radius: 8px;
    padding: 4px;
    color: #111;
}

.twp-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    width: max-content;
    min-width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 9999;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
}

.twp-language-switcher.dropdown.twp-label-none .twp-dropdown-list {
    width: fit-content;
    min-width: 0;
}

.twp-language-switcher.dropdown.twp-label-code .twp-dropdown-list,
.twp-language-switcher.dropdown.twp-label-name .twp-dropdown-list {
    width: max-content;
    min-width: max-content;
}

.twp-language-switcher.dropdown:hover .twp-dropdown-list {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.twp-language-switcher.dropdown.twp-justify-end .twp-dropdown-list,
.twp-language-switcher.dropdown.twp-justify-between .twp-dropdown-list {
    left: auto;
    right: 0;
}

.twp-language-switcher.dropdown.twp-justify-center .twp-dropdown-list {
    left: 50%;
    right: auto;
    transform: translate(-50%, -10px);
}

.twp-language-switcher.dropdown.twp-justify-center:hover .twp-dropdown-list {
    transform: translate(-50%, 0);
}

.twp-dropdown-list .twp-switcher-item {
    padding: 4px 8px;
}

.twp-dropdown-list .twp-switcher-link {
    padding: 6px 8px;
    border-radius: 8px;
    justify-content: flex-start;
    width: 100%;
    gap: 8px;
}

.twp-dropdown-list .twp-switcher-link:hover {
    background-color: #f8f9fa;
}

.twp-language-switcher.dropdown.twp-label-none .twp-dropdown-list .twp-flag {
    margin-right: 0;
}
