/* ============================================================
   Auto Translate SEO - Language Switcher
   ============================================================ */

/* ---- フローティング（右下固定） ---- */
.ats-switcher.ats-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
}

/* ---- インライン（ショートコード / ヘッダー埋め込み） ---- */
.ats-switcher.ats-inline {
    display: inline-block;
    vertical-align: middle;
}

/* ============================================================
   共通
   ============================================================ */
.ats-switcher {
    font-family: inherit;
    position: relative;
}

/* ============================================================
   トリガーボタン（丸形 LANG ボタン）
   ============================================================ */
.ats-trigger {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: inherit;
    transition: opacity .2s;
    text-decoration: none;
    box-sizing: border-box;
}
.ats-trigger:hover {
    opacity: .75;
}

/* SVGアイコン */
.ats-trigger .ats-icon {
    display: block;
    width: 28px;
    height: 28px;
}
.ats-trigger .ats-icon img,
.ats-trigger .ats-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* LANG テキスト */
.ats-trigger .ats-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    color: inherit;
}

/* ============================================================
   ドロップダウンメニュー
   ============================================================ */
.ats-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 99999;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

/* フローティングはボタン上に展開 */
.ats-floating .ats-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
    left: auto;
    right: 0;
}

.ats-switcher.open .ats-dropdown {
    display: block;
    animation: ats-fadein .15s ease;
}

@keyframes ats-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 各言語アイテム */
.ats-dropdown li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,.2);
}
.ats-dropdown li:last-child {
    border-bottom: none;
}

.ats-dropdown li a {
    display: block;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    transition: filter .15s;
}
.ats-dropdown li a:hover {
    filter: brightness(.88);
}

/* 現在の言語 */
.ats-dropdown li[aria-selected="true"] a {
    font-weight: 900;
}
.ats-dropdown li[aria-selected="true"] a::before {
    content: '✓ ';
    font-weight: 900;
}

/* ============================================================
   RTL対応
   ============================================================ */
[dir="rtl"] .ats-floating {
    right: auto;
    left: 24px;
}
[dir="rtl"] .ats-floating .ats-dropdown {
    right: auto;
    left: 0;
}
