/**
 * Flag Language Switcher for Elementor
 * Version: 2.0.0
 */

/* ── Wrapper ─────────────────────────────────────────────── */
.fls-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.fls-switcher.fls-layout-vertical {
    flex-direction: column;
    align-items: flex-start;
}

/* ── Flag item ───────────────────────────────────────────── */
.fls-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.fls-item a {
    display: block;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none;
}

/* ── Flag circle ─────────────────────────────────────────── */
.fls-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    position: relative;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.18),
        0 1px 2px rgba(0,0,0,0.10);
    transition:
        box-shadow 0.22s ease,
        transform  0.22s ease;
}

.fls-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    pointer-events: none;
}

/* Czech flag needs slight left-shift so triangle shows */
.fls-item[data-lang="cz"] .fls-circle img {
    object-position: 38% center;
}

/* ── Inactive – hover ────────────────────────────────────── */
.fls-item.fls-inactive a:hover .fls-circle {
    box-shadow:
        0 6px 18px rgba(0,0,0,0.22),
        0 2px 6px  rgba(0,0,0,0.14);
    transform: scale(1.10) translateY(-2px);
}

/* ── Active flag ─────────────────────────────────────────── */
.fls-item.fls-active .fls-circle {
    box-shadow:
        0 0 0 3px #ffffff,
        0 0 0 5px #2271b1,
        0 4px 14px rgba(34,113,177,0.30);
    cursor: default;
}

/* Active dot indicator */
.fls-item.fls-active::after {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    background: #2271b1;
    border-radius: 50%;
    margin-top: 5px;
    box-shadow: 0 1px 3px rgba(34,113,177,0.45);
}

/* ── Label (optional) ────────────────────────────────────── */
.fls-label {
    display: block;
    font-size: 11px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: currentColor;
    margin-top: 5px;
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
}

.fls-item.fls-active .fls-label {
    font-weight: 600;
}

/* ── Tooltip ─────────────────────────────────────────────── */
.fls-tooltip {
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15,15,15,0.82);
    color: #fff;
    font-size: 11.5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 4px 10px;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.16s ease;
    z-index: 9999;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.fls-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(15,15,15,0.82);
}

.fls-item:hover .fls-tooltip {
    opacity: 1;
}

/* ── Vertical layout label alignment ─────────────────────── */
.fls-switcher.fls-layout-vertical .fls-item {
    flex-direction: row;
    gap: 10px;
}

.fls-switcher.fls-layout-vertical .fls-tooltip {
    bottom: auto;
    top: 50%;
    left: calc(100% + 9px);
    transform: translateY(-50%);
}

.fls-switcher.fls-layout-vertical .fls-tooltip::after {
    top: 50%;
    left: auto;
    right: 100%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-right-color: rgba(15,15,15,0.82);
}

.fls-switcher.fls-layout-vertical .fls-item.fls-active::after {
    margin-top: 0;
    margin-left: 0;
    align-self: center;
}
