/* CreaTrans language switcher */
.ct-ls { --ct-bg: #fff; --ct-fg: #1d2327; --ct-border: #dcdcde; --ct-hover: #f0f0f1; font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ct-fg); }
.ct-ls-dark { --ct-bg: #1d2327; --ct-fg: #f0f0f1; --ct-border: #3c434a; --ct-hover: #2c3338; }
.ct-ls ul { list-style: none; margin: 0; padding: 0; }
.ct-ls a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; color: inherit; text-decoration: none; border-radius: 4px; }
.ct-ls a:hover, .ct-ls a:focus-visible { background: var(--ct-hover); }
.ct-ls a:focus-visible, .ct-ls summary:focus-visible { outline: 2px solid #2271b1; outline-offset: 1px; }
.ct-ls .ct-flag { flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.ct-ls-list ul, .ct-ls-flags ul { display: flex; flex-wrap: wrap; gap: 4px; }
.ct-ls-list .ct-ls-current a, .ct-ls-flags .ct-ls-current a { font-weight: 600; background: var(--ct-hover); }
.ct-ls-dropdown { position: relative; display: inline-block; }
.ct-ls-dropdown summary { display: flex; align-items: center; gap: 8px; padding: 6px 28px 6px 10px; background: var(--ct-bg); border: 1px solid var(--ct-border); border-radius: 6px; cursor: pointer; list-style: none; position: relative; }
.ct-ls-dropdown summary::-webkit-details-marker { display: none; }
.ct-ls-dropdown summary::after { content: ""; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); }
.ct-ls-dropdown[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ct-ls-dropdown ul { position: absolute; left: 0; min-width: 100%; margin-top: 4px; padding: 4px; background: var(--ct-bg); border: 1px solid var(--ct-border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); z-index: 99999; }
/* Flags dropdown: only the current flag; an arrow appears on hover, the other flags open on click. */
.ct-ls-flags-dropdown { position: relative; color: inherit; }
.ct-ls-flags-dropdown summary { display: flex; align-items: center; gap: 6px; padding: 6px 4px 6px 8px; border-radius: 6px; cursor: pointer; list-style: none; line-height: 1; }
.ct-ls-flags-dropdown summary::-webkit-details-marker { display: none; }
.ct-ls-flags-dropdown summary::after { content: ""; flex: none; width: 6px; height: 6px; margin: -3px 4px 0 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0; }
.ct-ls-flags-dropdown:hover summary::after, .ct-ls-flags-dropdown summary:focus-visible::after, .ct-ls-flags-dropdown[open] summary::after { opacity: 1; }
.ct-ls-flags-dropdown[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
@media (hover: none) { .ct-ls-flags-dropdown summary::after { opacity: 1; } }
.ct-ls-flags-dropdown ul { position: absolute; left: 0; top: 100%; margin-top: 4px; padding: 4px; color: var(--ct-fg); background: var(--ct-bg); border: 1px solid var(--ct-border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); z-index: 99999; }
.ct-ls-flags-dropdown ul a { padding: 6px 8px; }
.ct-ls-floating .ct-ls-flags-dropdown summary { color: var(--ct-fg); background: var(--ct-bg); border: 1px solid var(--ct-border); }
.ct-ls-floating[class*="ct-ls-bottom"] .ct-ls-flags-dropdown ul { top: auto; bottom: 100%; margin: 0 0 4px; }
/* Alignment inside headers and menus: keep the switcher on one line and centred on the row,
   and drop the empty paragraphs themes leave around a shortcode (their margins push it up or down). */
.ct-ls-dropdown, .ct-ls-flags-dropdown, .ct-ls-list, .ct-ls-flags { display: inline-block; vertical-align: middle; width: max-content; max-width: 100vw; }
.ct-ls-name { white-space: nowrap; }
/* An open switcher and its list sit above sliders, sticky bars and other page elements. */
.ct-ls-dropdown[open], .ct-ls-flags-dropdown[open] { z-index: 999999; }
.ct-ls-dropdown ul, .ct-ls-flags-dropdown ul { z-index: 999999; }
p:empty:has(+ .ct-ls), .ct-ls + p:empty { display: none; }
.ct-ls-floating { position: fixed; z-index: 99998; }
.ct-ls-floating.ct-ls-bottom-right { right: 16px; bottom: 16px; }
.ct-ls-floating.ct-ls-bottom-left { left: 16px; bottom: 16px; }
.ct-ls-floating.ct-ls-top-right { right: 16px; top: 16px; }
.ct-ls-floating.ct-ls-top-left { left: 16px; top: 16px; }
.ct-ls-floating[class*="ct-ls-bottom"] .ct-ls-dropdown ul { bottom: 100%; margin: 0 0 4px; }
.ct-ls-floating .ct-ls-list, .ct-ls-floating .ct-ls-flags { background: var(--ct-bg); border: 1px solid var(--ct-border); border-radius: 6px; padding: 4px; box-shadow: 0 4px 16px rgba(0, 0, 0, .1); }
.ct-ls-menu-item .ct-flag { vertical-align: middle; margin-right: 4px; }
@media (prefers-reduced-motion: no-preference) { .ct-ls a, .ct-ls summary { transition: background-color .15s; } }
