/* =========================================
   Floating Language Switcher
   Visible on all pages including LearnDash.
   Syncs with .site-language-toggle-wrap pills.
   ========================================= */

.fls-wrap {
    position: fixed;
    top: 20%;
    right: 0;
    z-index: 99999;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;

    /* Slide in from right */
    transform: translateX(0);
    transition: transform 0.2s ease;
}

/* Individual pill */
.fls-pill {
    display: flex;
    align-items: center;
    justify-content: center;

    /* Slightly peek out from the edge */
    width: 52px;
    height: 38px;
    padding: 0 10px;

    background: #F7EFE1;
    color: #f6921f;
    border: 1px solid #f6921f;
    border-right: none;                  /* flush against viewport edge */
    border-radius: 10px 0 0 10px;       /* round left corners only */

    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;

    /* Tooltip via translate */
    position: relative;
    transition: width 0.2s ease, background 0.15s ease, color 0.15s ease;

    /* Subtle right-edge shadow so it looks like a tab */
    box-shadow: -2px 2px 8px rgba(246, 146, 31, 0.15);
}

/* Active state */
.fls-pill.is-active {
    background: #f6921f;
    color: #F7EFE1;
}

/* Tooltip on hover */
.fls-pill::after {
    content: attr(data-full);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);

    background: #f6921f;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Tooltip arrow pointing right */
.fls-pill::before {
    content: "";
    position: absolute;
    right: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);

    border: 5px solid transparent;
    border-left-color: #f6921f;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fls-pill:hover::after,
.fls-pill:hover::before {
    opacity: 1;
    visibility: visible;
}

.fls-pill:hover {
    width: 58px;
}
