/* Color Palette based on image_0.png */
:root {
    --agency-lang-bg: #FFF; /* background */
    --agency-lang-text: #0B1723; /* text color */
    --agency-lang-sep: #1A5A66; /* Match text for the line separator */
}

.agency-translator-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

/* General Layout Component (Mimicking Figma frames) */
.agency-lang-component {
    position: relative;
    font-family: sans-serif; 
    width: auto;
}

/* Common Content structure for buttons/list-items */
.agency-lang-content {
    display: flex;
    align-items: center;
    gap: 8px; 
    padding: 7px 19px; 
    transition: background 0.2s ease;
	border-radius:16px;
	background-color: var(--agency-lang-bg);
}

/* --- Trigger Button (Frame 165 state) --- */
.agency-lang-trigger {
    display: block;
    width: 100%;
	height:56px;
    margin: 0;
    padding: 0 !important;
    border: 1px solid #0B17231A;
    border-radius: 100px; 
    cursor: pointer;
    box-shadow: none;
    text-align: left;
    transition: all 0.2s ease;
    outline: none;
	background-color: var(--agency-lang-bg);
}

/* Dropdown list open state modification */
.is-open .agency-lang-trigger {
    border-radius: 16px 16px 0 0; 
}

/* Define the Chevron icon using CSS ::after */
.agency-lang-trigger .agency-lang-content::after {
    content: '';
    display: inline-block;
    margin-left: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #333333; 
    transition: transform 0.2s ease;
    pointer-events: none; /* Let clicks pass through to button */
}

/* Rotate Chevron Up */
.is-open .agency-lang-trigger .agency-lang-content::after {
    transform: rotate(180deg);
}


/* --- Dropdown List --- */
.agency-lang-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Sits directly below trigger */
    left: 0;
    width: 100%;
	height:56px;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: var(--agency-lang-bg);
	border: 1px solid #0B17231A;
    border-radius: 0 0 16px 16px; /* Rounded bottom corners */
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); /* Soft, subtle shadow */
    z-index: 9999;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    
}

/* State toggle: show dropdown */
.is-open .agency-lang-dropdown {
    display: block;
}

/* The horizontal line separator line from image_0.png */
.agency-lang-dropdown::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--agency-lang-sep); 
    transform: scaleX(0.85); 
    opacity: 0; /* Hidden initially, shown only when open */
    transition: opacity 0.1s ease 0.1s; /* Delayed visibility so it doesn't blink */
}

.is-open .agency-lang-dropdown::before {
    
}

/* Individual list item rows */
.agency-lang-option {
    cursor: pointer;
    margin: 0;
    padding-top: 10px;
}

.agency-lang-option:hover {
    
}

/* Specific styling for the line between items */
.agency-lang-dropdown li + li {
    position: relative;
}

/* Ensuring rounded bottom on last item in the list */
.agency-lang-dropdown li:last-child {
    border-radius: 0 0 12px 12px;
}


/* --- Flag Images styling --- */
.agency-lang-flag {
    display: block;
    width: 20px; /* Adjust flag diameter to match design */
    height: 20px !important;
    object-fit: contain;
    border-radius: 100% !important; /* Replicates circular flags */
    flex-shrink: 0; /* Prevents flag squishing in flexbox */
    object-fit:cover !important;
}

/* --- Language Code text styling --- */
.agency-lang-code {
    font-size: 16px;
    font-weight: 500;
    color: var(--agency-lang-text); 
    line-height: 1;
    text-transform: uppercase;
}
/* Strictly hide the currently active language from the dropdown list */
.agency-lang-dropdown .agency-lang-option[aria-selected="true"] {
    display: none !important;
}