/**
 * Multilingual SEO - Language Switcher Styles
 */

/* Base Switcher Styles */
.mlseo-switcher {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.mlseo-switcher a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mlseo-switcher a:hover {
    opacity: 0.8;
}

/* Flag Emoji Icons - Direct emoji output from PHP */
.mlseo-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif;
    font-style: normal;
}

/* Check icon for current language */
.mlseo-check-icon {
    display: inline-block;
    margin-left: auto;
    color: #0073aa;
    font-weight: bold;
    font-size: 14px;
}

/* ==================== */
/* DROPDOWN STYLE       */
/* ==================== */
.mlseo-switcher-dropdown {
    position: relative;
    display: inline-block;
}

.mlseo-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.mlseo-switcher-toggle:hover {
    border-color: #999;
    background: #f9f9f9;
}

.mlseo-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    margin-left: 4px;
    transition: transform 0.2s;
}

.mlseo-switcher-toggle[aria-expanded="true"] .mlseo-arrow {
    transform: rotate(180deg);
}

.mlseo-switcher-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 150px;
    margin-top: 4px;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.mlseo-switcher-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mlseo-switcher-menu li {
    margin: 0;
    padding: 0;
}

.mlseo-switcher-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #333;
    transition: background 0.2s;
}

.mlseo-switcher-menu li a:hover {
    background: #f5f5f5;
    opacity: 1;
}

.mlseo-switcher-menu li:first-child a {
    border-radius: 4px 4px 0 0;
}

.mlseo-switcher-menu li:last-child a {
    border-radius: 0 0 4px 4px;
}

/* Current/Active language in dropdown menu */
.mlseo-switcher-menu li.mlseo-menu-current a,
.mlseo-switcher-menu li a.mlseo-lang-active {
    background: #f0f7ff;
    font-weight: 600;
    position: relative;
}

.mlseo-switcher-menu li.mlseo-menu-current a:hover,
.mlseo-switcher-menu li a.mlseo-lang-active:hover {
    background: #e5f0fa;
}


/* ==================== */
/* LIST STYLE           */
/* ==================== */
.mlseo-switcher-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mlseo-switcher-list li {
    margin: 0;
    padding: 0;
}

.mlseo-switcher-list li a,
.mlseo-switcher-list li .mlseo-lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.mlseo-switcher-list li:last-child a,
.mlseo-switcher-list li:last-child .mlseo-lang-current {
    border-bottom: none;
}

.mlseo-switcher-list li a:hover {
    background: #f5f5f5;
}

.mlseo-switcher-list .mlseo-current a,
.mlseo-switcher-list li a.mlseo-lang-active {
    font-weight: 600;
    background: #f0f7ff;
}

.mlseo-switcher-list .mlseo-current a:hover,
.mlseo-switcher-list li a.mlseo-lang-active:hover {
    background: #e5f0fa;
}

/* ==================== */
/* INLINE STYLE         */
/* ==================== */
.mlseo-switcher-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mlseo-switcher-inline a,
.mlseo-switcher-inline .mlseo-lang-current {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background 0.2s;
}

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

.mlseo-switcher-inline a.mlseo-lang-active {
    font-weight: 600;
    background: #e8e8e8;
}

.mlseo-switcher-inline a.mlseo-lang-active:hover {
    background: #ddd;
}

.mlseo-separator {
    color: #ccc;
    margin: 0 4px;
}

/* ==================== */
/* FLAGS ONLY STYLE     */
/* ==================== */
.mlseo-switcher-flags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mlseo-flag-link {
    display: inline-block;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.mlseo-flag-link:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.mlseo-flag-link.mlseo-current {
    background: #e0e0e0;
    box-shadow: 0 0 0 2px #0073aa;
}

.mlseo-flag-link.mlseo-current:hover {
    transform: scale(1.1);
    background: #d0d0d0;
}

.mlseo-flag-link .mlseo-flag {
    width: 24px;
    height: 18px;
}

/* ==================== */
/* FLOATING SWITCHER    */
/* ==================== */
.mlseo-floating-switcher {
    position: fixed;
    z-index: 99999;
}

.mlseo-floating-switcher .mlseo-switcher-dropdown .mlseo-switcher-menu {
    bottom: 100%;
    top: auto;
    margin-bottom: 4px;
    margin-top: 0;
}

.mlseo-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.mlseo-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.mlseo-position-top-right {
    top: 20px;
    right: 20px;
}

.mlseo-position-top-left {
    top: 20px;
    left: 20px;
}

.mlseo-position-top-right .mlseo-switcher-dropdown .mlseo-switcher-menu,
.mlseo-position-top-left .mlseo-switcher-dropdown .mlseo-switcher-menu {
    top: 100%;
    bottom: auto;
    margin-top: 4px;
    margin-bottom: 0;
}

/* Floating button style */
.mlseo-floating-switcher .mlseo-switcher-toggle {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border: none;
}

.mlseo-floating-switcher .mlseo-switcher-toggle:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ==================== */
/* WIDGET STYLES        */
/* ==================== */
.widget.mlseo-widget-switcher {
    padding: 0;
}

.widget.mlseo-widget-switcher .mlseo-switcher-list {
    margin: 0;
}

.widget.mlseo-widget-switcher .mlseo-switcher-list li a,
.widget.mlseo-widget-switcher .mlseo-switcher-list li .mlseo-lang-current {
    padding: 10px 0;
}

/* ==================== */
/* DARK MODE SUPPORT    */
/* ==================== */
@media (prefers-color-scheme: dark) {
    .mlseo-switcher-toggle {
        background: #2d2d2d;
        border-color: #444;
        color: #fff;
    }

    .mlseo-switcher-toggle:hover {
        background: #3d3d3d;
        border-color: #555;
    }

    .mlseo-switcher-menu {
        background: #2d2d2d;
        border-color: #444;
    }

    .mlseo-switcher-menu li a {
        color: #fff;
    }

    .mlseo-switcher-menu li a:hover {
        background: #3d3d3d;
    }

    .mlseo-switcher-menu li.mlseo-menu-current a,
    .mlseo-switcher-menu li a.mlseo-lang-active {
        background: #1a3a5c;
    }

    .mlseo-switcher-menu li.mlseo-menu-current a:hover,
    .mlseo-switcher-menu li a.mlseo-lang-active:hover {
        background: #234a6c;
    }

    .mlseo-switcher-list li a {
        color: #fff;
    }

    .mlseo-switcher-list li a:hover {
        background: #3d3d3d;
    }

    .mlseo-switcher-list .mlseo-current a,
    .mlseo-switcher-list li a.mlseo-lang-active {
        background: #1a3a5c;
    }

    .mlseo-switcher-list .mlseo-current a:hover,
    .mlseo-switcher-list li a.mlseo-lang-active:hover {
        background: #234a6c;
    }

    .mlseo-switcher-inline a {
        color: #fff;
    }

    .mlseo-switcher-inline a:hover {
        background: #3d3d3d;
    }

    .mlseo-switcher-inline a.mlseo-lang-active {
        background: #444;
    }

    .mlseo-switcher-inline a.mlseo-lang-active:hover {
        background: #555;
    }

    .mlseo-flag-link:hover {
        background: #3d3d3d;
    }

    .mlseo-flag-link.mlseo-current {
        background: #444;
        box-shadow: 0 0 0 2px #4da6ff;
    }

    .mlseo-flag-link.mlseo-current:hover {
        background: #555;
    }

    .mlseo-floating-switcher .mlseo-switcher-toggle {
        background: #2d2d2d;
    }

    .mlseo-arrow {
        border-top-color: #aaa;
    }

    .mlseo-check-icon::before {
        border-color: #4da6ff;
    }
}

/* ==================== */
/* RESPONSIVE           */
/* ==================== */
@media screen and (max-width: 600px) {
    .mlseo-floating-switcher {
        bottom: 10px !important;
        right: 10px !important;
        left: auto !important;
        top: auto !important;
    }

    .mlseo-floating-switcher.mlseo-position-bottom-left,
    .mlseo-floating-switcher.mlseo-position-top-left {
        left: 10px !important;
        right: auto !important;
    }

    .mlseo-switcher-menu {
        min-width: 130px;
    }

    .mlseo-switcher-toggle {
        padding: 6px 10px;
        font-size: 13px;
    }
}
