/* Treysan Language Sticker Styles - Fixed version removed as requested */

/* Styles for shortcode version */
.tls-language-dropdown {
    position: relative;
    display: inline-block;
    font-family: inherit; /* Use theme font instead of Arial */
}

.tls-current-lang {
    background-color: transparent !important;
    color: #cf2d2e !important; /* Updated Treysan red for globe icon */
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 40px;
    height: 40px;
    font-size: 17px !important; /* Exact size for Font Awesome globe icon */
    cursor: pointer;
    transition: color 0.3s;
    border: none !important; /* No border for icon design */
    text-align: center;
    line-height: 1;
    margin: 0 !important;
    padding: 0 5px !important; /* Add horizontal padding for spacing */
    box-sizing: border-box;
}

.tls-current-lang .fas.fa-globe {
    flex: 1;
    text-align: left;
}

.tls-current-lang .icon.icon-down-arrow1.elementskit-submenu-indicator {
    flex: 1;
    text-align: right;
    font-size: 12px !important; /* Smaller size for arrow icon */
    margin-top:4px;
    margin-left:8px;
}

.tls-current-lang:hover {
    background-color: transparent; /* Keep transparent on hover */
}

.tls-lang-list {
    list-style: none;
    margin: 0;
    padding: 5px 0;
    position: absolute;
    top: calc(100% + 5px); /* Position below the button with small gap */
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff; /* White background for dropdown */
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px); /* Start slightly lower */
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    -webkit-transition: opacity 0.3s ease, -webkit-transform 0.3s ease, visibility 0.3s;
    z-index: 9999;
    min-width: 60px; /* Ensure minimum width */
    pointer-events: none; /* Initially disable pointer events */
    display: none; /* Hide by default since we're using modal */
}

.tls-language-dropdown.tls-active .tls-lang-list {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0); /* Move to original position */
    pointer-events: auto; /* Enable pointer events when active */
}

.tls-lang-list li {
    margin: 0;
    padding: 0;
}

.tls-lang-list li a {
    display: block;
    padding: 10px 15px; /* Adjusted padding */
    color: inherit; /* Use theme color */
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    text-align: center;
}

.tls-lang-list li a:hover {
    background-color: #f0f0f0;
}

/* Specific styles for the fixed footer version - removed as requested */

/* Responsive adjustments for shortcode version */
@media (max-width: 1024px) {
    .tls-language-dropdown .tls-current-lang {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .tls-current-lang .icon.icon-down-arrow1.elementskit-submenu-indicator {
        font-size: 10px !important; /* Smaller arrow for mobile */
        margin-top:4px;
        margin-left:8px;
    }

    .tls-lang-list {
        min-width: 50px;
    }

    .tls-lang-list li a {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Modal styles */
.tls-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5); /* Semi-transparent background */
}

.tls-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: none;
    border-radius: 8px;
    width: 80%;
    max-width: 300px;
    position: relative;
    text-align: center;
}

.tls-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tls-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.tls-close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.tls-close:hover,
.tls-close:focus {
    color: #000;
}

.tls-lang-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tls-lang-options li {
    margin: 8px 0;
}

.tls-lang-options a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.tls-lang-options a:hover {
    background-color: #f0f0f0;
}

/* Ensure proper positioning in header contexts */
.header .tls-language-dropdown,
.site-header .tls-language-dropdown,
.elementor-widget-tls_language_dropdown .tls-language-dropdown {
    vertical-align: middle;
}
