/* WPML Language Switcher Styles */
.ewl-wpml-switcher {
    position: relative;
    display: inline-block;
}

.ewl-current-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ewl-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ewl-flag img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ewl-lang-name {
    font-size: 14px;
    line-height: 1;
}

.ewl-dropdown {
    background: transparent;
    border: none;
    min-width: 150px;
    z-index: 1000;
}

.ewl-lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    text-decoration: none;
    color: #333;
    transition: opacity 0.2s ease;
}

.ewl-lang-item:hover {
    opacity: 0.7;
}

/* When language names are shown, add styling */
.ewl-wpml-switcher .ewl-lang-item .ewl-lang-name {
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ewl-wpml-switcher .ewl-lang-item:hover .ewl-lang-name {
    background-color: #f5f5f5;
}

/* Dropdown mode - hide dropdown by default and show on hover */
.ewl-mode-dropdown .ewl-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ewl-mode-dropdown:hover .ewl-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* List mode - always show all languages */
.ewl-mode-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ewl-mode-list .ewl-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    background: transparent;
    min-width: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ewl-mode-list .ewl-current-lang {
    padding: 0;
    background: transparent;
    cursor: default;
}

/* Add styling only when language names are shown in list mode */
.ewl-mode-list .ewl-current-lang .ewl-lang-name {
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.ewl-mode-list .ewl-lang-item .ewl-lang-name {
    border-radius: 4px;
    border: 1px solid #ddd;
}
