/* ========================================
   WooCommerce Multilang Pro - Language Switcher
   Modern, Clean Design
   ======================================== */

.wml-language-switcher {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ========================================
   Dropdown Style (Default)
   ======================================== */
.wml-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 40px 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    min-width: 140px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.wml-dropdown select:hover {
    border-color: #bbb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.wml-dropdown select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.15);
}

/* ========================================
   Flags Style (Horizontal Links)
   ======================================== */
.wml-flags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.wml-flags .wml-lang-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.wml-flags .wml-lang-link:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.wml-flags .wml-lang-link.active {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border-color: #0073aa;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,115,170,0.3);
}

.wml-flags .wml-lang-link.active:hover {
    background: linear-gradient(135deg, #005a87 0%, #004466 100%);
    transform: translateY(-1px);
}

.wml-flags .wml-flag {
    font-size: 16px;
    line-height: 1;
}

.wml-flags .wml-lang-name {
    font-size: 13px;
    white-space: nowrap;
}

/* ========================================
   Compact Style (Icons Only)
   ======================================== */
.wml-compact {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wml-compact .wml-lang-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.wml-compact .wml-lang-link:hover {
    background: #f5f5f5;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.wml-compact .wml-lang-link.active {
    background: #0073aa;
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0,115,170,0.4);
}

/* ========================================
   Floating Style (Bottom Right)
   ======================================== */
.wml-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.wml-floating .wml-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,115,170,0.4);
    transition: all 0.3s ease;
}

.wml-floating .wml-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,115,170,0.5);
}

.wml-floating .wml-float-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s ease;
}

.wml-floating.open .wml-float-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.wml-floating .wml-float-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: background 0.2s;
    white-space: nowrap;
}

.wml-floating .wml-float-menu a:hover {
    background: #f5f5f5;
}

.wml-floating .wml-float-menu a.active {
    background: #e8f4fc;
    color: #0073aa;
    font-weight: 600;
}

/* ========================================
   Dark Mode Support
   ======================================== */
@media (prefers-color-scheme: dark) {
    .wml-dropdown select {
        background: linear-gradient(to bottom, #2d2d2d 0%, #252525 100%);
        border-color: #444;
        color: #eee;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    }

    .wml-flags .wml-lang-link,
    .wml-compact .wml-lang-link {
        background: #2d2d2d;
        border-color: #444;
        color: #ddd;
    }

    .wml-flags .wml-lang-link:hover,
    .wml-compact .wml-lang-link:hover {
        background: #3d3d3d;
        color: #fff;
    }

    .wml-floating .wml-float-menu {
        background: #2d2d2d;
    }

    .wml-floating .wml-float-menu a {
        color: #ddd;
    }

    .wml-floating .wml-float-menu a:hover {
        background: #3d3d3d;
    }
}

/* ========================================
   RTL Support
   ======================================== */
body.rtl .wml-language-switcher,
body[dir="rtl"] .wml-language-switcher {
    direction: ltr !important;
    text-align: left !important;
}

body.rtl .wml-floating,
body[dir="rtl"] .wml-floating {
    right: auto;
    left: 20px;
}

body.rtl .wml-floating .wml-float-menu,
body[dir="rtl"] .wml-floating .wml-float-menu {
    right: auto;
    left: 0;
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .wml-flags .wml-lang-link {
        padding: 6px 10px;
        font-size: 12px;
    }

    .wml-flags .wml-flag {
        font-size: 14px;
    }

    .wml-dropdown select {
        min-width: 120px;
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }

    .wml-floating {
        bottom: 15px;
        right: 15px;
    }

    .wml-floating .wml-float-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
