/* Sticky Container */
#pll-cs-sticky-container {
    position: fixed;
    z-index: 99999;
    padding: 10px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.pll-cs-hidden {
    display: none !important;
}

.pll-cs-sticky-bottom-right {
    bottom: 20px;
    right: 20px;
}

.pll-cs-sticky-bottom-left {
    bottom: 20px;
    left: 20px;
}

.pll-cs-sticky-top-right {
    top: 20px;
    right: 20px;
}

.pll-cs-sticky-top-left {
    top: 20px;
    left: 20px;
}

/* Common Flex Styling */
#pll-cs-sticky-container ul,
.pll-cs-dropdown-trigger,
.pll-cs-dropdown-options ul li a,
.pll-cs-current {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* List View Styling */
#pll-cs-sticky-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#pll-cs-sticky-container>ul {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#pll-cs-sticky-container>ul li {
    margin: 0;
}

#pll-cs-sticky-container>ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 30px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

#pll-cs-sticky-container>ul li a:hover {
    background: #f5f5f7;
    transform: translateY(-1px);
}

#pll-cs-sticky-container>ul li.current-lang a {
    background: #2271b1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

/* Custom Dropdown Styling */
.pll-cs-custom-dropdown {
    position: relative;
    min-width: 160px;
}

.pll-cs-dropdown-trigger {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    user-select: none;
}

.pll-cs-dropdown-trigger:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.pll-cs-label {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    margin-right: auto;
}

.pll-cs-current {
    margin-left: 10px;
    margin-right: 8px;
}

.pll-cs-lang-name {
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
}

.pll-cs-arrow {
    font-size: 10px;
    color: #888;
    transition: transform 0.3s ease;
}

.pll-cs-custom-dropdown.active .pll-cs-arrow {
    transform: rotate(180deg);
}

/* Dropdown Options */
.pll-cs-dropdown-options {
    position: absolute;
    bottom: 100%;
    /* Opens upwards by default */
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    z-index: 100000;
}

/* Adjust for top positions */
.pll-cs-sticky-top-right .pll-cs-dropdown-options,
.pll-cs-sticky-top-left .pll-cs-dropdown-options {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 8px;
    transform: translateY(-10px);
}

.pll-cs-custom-dropdown.active .pll-cs-dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pll-cs-dropdown-options ul {
    flex-direction: column;
    padding: 6px;
    gap: 2px !important;
}

.pll-cs-dropdown-options ul li {
    width: 100%;
}

.pll-cs-dropdown-options ul li a {
    padding: 10px 12px;
    border-radius: 8px;
    color: #444;
    font-size: 14px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.pll-cs-dropdown-options ul li a:hover {
    background: #f5f5f7;
    color: #000;
}

.pll-cs-dropdown-options ul li.current-lang a {
    background: #f0f7ff;
    color: #2271b1;
    font-weight: 600;
}

/* Flag Images */
#pll-cs-sticky-container img {
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}