/* MS Translate - switcher języków */

.mst-switcher {
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    display: inline-block;
}

/* Tryb floating - widget przyklejony w prawym górnym rogu */
.mst-switcher.mst-mode-floating {
    position: fixed;
    top: 20px;
    right: 20px;
}

/* Tryb inline - widget w treści (przez shortcode [gtranslate] / [mstranslate]) */
.mst-switcher.mst-mode-inline {
    position: relative;
    display: inline-block;
}

.mst-current {
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.15s ease;
    font-size: 14px;
    line-height: 1;
}

.mst-current:hover {
    background: #f7f7f7;
    border-color: #ccc;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.mst-flag {
    display: inline-block;
    width: 24px;
    height: 18px;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    flex-shrink: 0;
}

.mst-arrow {
    font-size: 10px;
    color: #888;
    transition: transform 0.2s ease;
}

.mst-switcher.mst-open .mst-arrow {
    transform: rotate(180deg);
}

.mst-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    list-style: none !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    min-width: 170px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 99999;
}

/* Dropdown otwierany przez JS (klik) */
.mst-switcher.mst-open .mst-dropdown {
    display: block;
}

/* Fallback - dropdown otwiera się też on hover (bez JS) */
.mst-switcher:hover .mst-dropdown,
.mst-switcher:focus-within .mst-dropdown {
    display: block;
}

.mst-dropdown li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mst-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #1a1a1a !important;
    text-decoration: none !important;
    font-size: 14px;
    transition: background 0.1s ease;
}

.mst-dropdown li a:hover {
    background: #06A5D0;
    color: #fff !important;
}

.mst-dropdown li.mst-active a {
    background: #f0f7ff;
    font-weight: 600;
}

.mst-dropdown li.mst-active a:hover {
    background: #06A5D0;
}

/* Mobile */
@media (max-width: 768px) {
    .mst-switcher {
        top: 12px;
        right: 12px;
        font-size: 13px;
    }
    .mst-current {
        padding: 7px 12px;
    }
    .mst-current .mst-name {
        display: none; /* na mobile pokaż tylko flagę */
    }
}
