/**
 * AI Translator Lite - Language Switcher Styles
 */

/* Floating switcher - bottom right corner */
.aitl-switcher-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Shortcode dropdown: not fixed position */
.aitl-switcher-float.aitl-switcher-shortcode {
    position: relative;
    bottom: auto;
    right: auto;
    display: inline-block;
}

.aitl-switcher-trigger {
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.aitl-switcher-trigger .aitl-lang-current {
    font-weight: 600;
    white-space: nowrap;
}

.aitl-switcher-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

.aitl-switcher-trigger:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.aitl-switcher-trigger .aitl-flag {
    font-size: 22px;
    line-height: 1;
}

.aitl-switcher-dropdown {
    display: none;
    position: absolute;
    bottom: 54px;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    overflow: hidden;
}

.aitl-switcher-shortcode .aitl-switcher-dropdown {
    bottom: auto;
    top: 54px;
}

.aitl-switcher-float.active .aitl-switcher-dropdown {
    display: block;
}

.aitl-switcher-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.15s;
}

.aitl-switcher-item:hover {
    background: #f0f0f0;
}

.aitl-switcher-item .aitl-flag {
    font-size: 18px;
    line-height: 1;
}

.aitl-switcher-item .aitl-lang-name {
    font-size: 14px;
    font-weight: 500;
}

/* ---- Nav menu language dropdown ---- */
.aitl-menu-switcher {
    position: relative;
}

.aitl-menu-switcher > a {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.aitl-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-width: 170px;
    z-index: 99999;
    padding: 4px 0;
    list-style: none;
    margin: 0;
}

.aitl-menu-switcher:hover > .aitl-menu-dropdown,
.aitl-menu-switcher.aitl-open > .aitl-menu-dropdown {
    display: block;
}

.aitl-menu-dropdown li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.aitl-menu-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.15s;
}

.aitl-menu-dropdown li a:hover {
    background: #f5f5f5;
}

/* Inline shortcode */
.aitl-switcher-inline {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.aitl-switcher-inline li {
    list-style: none;
}

.aitl-switcher-inline a {
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}

.aitl-switcher-inline a:hover {
    background: #f0f0f0;
}

.aitl-switcher-inline .active,
.aitl-switcher-inline .aitl-switcher-current {
    font-weight: 600;
    text-decoration: underline;
}
