/* Revision 4, item 11: searchable language picker + "Unique results only" switch (Seed Keyword Generator). */
select.lp-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.lp { position: relative; width: 100%; font-family: var(--pf-body, inherit); }
.lp-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid #e3e0f3; border-radius: 12px; background: #fff; color: #1f2437; font-size: 13.5px; font-weight: 550;
  text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.lp-btn:hover { border-color: #cfc8f5; }
.lp.is-open .lp-btn, .lp-btn:focus-visible { outline: none; border-color: #8b7bff; box-shadow: 0 0 0 4px rgba(110, 86, 247, .14); }
.lp-btn svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: #7b7699; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lp-val { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lp-caret { transition: transform .2s; }
.lp.is-open .lp-caret { transform: rotate(180deg); }
.lp-pop {
  position: absolute; z-index: 1080; top: calc(100% + 6px); left: 0; width: max(100%, 300px); max-width: min(360px, 92vw);
  padding: 8px; border: 1px solid #e7e4f6; border-radius: 14px; background: #fff;
  box-shadow: 0 24px 48px -20px rgba(36, 30, 92, .35), 0 4px 12px rgba(36, 30, 92, .06);
  animation: lpIn .16s cubic-bezier(.2, .8, .2, 1);
}
@keyframes lpIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lp-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; margin-bottom: 6px; border-radius: 10px; background: #f5f4fb; }
.lp-search svg { width: 15px; height: 15px; fill: none; stroke: #8a86a6; stroke-width: 2; stroke-linecap: round; }
.lp-search input { flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: none; background: transparent !important; box-shadow: none !important; padding: 0 !important; font-size: 13.5px; color: #1f2437; }
.lp-list { list-style: none; margin: 0; padding: 0; max-height: 264px; overflow-y: auto; overscroll-behavior: contain; }
.lp-opt { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: #1f2437; }
.lp-opt.is-auto { color: #5b45e0; font-weight: 600; border-bottom: 1px dashed #ece9fb; border-radius: 9px 9px 0 0; margin-bottom: 4px; }
.lp-native-name { color: #8a86a6; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-opt.is-active { background: #f2efff; }
.lp-opt.is-sel { background: #ebe6ff; color: #3b2fb0; font-weight: 650; }
.lp-opt.is-sel::after { content: ""; flex: 0 0 auto; width: 14px; height: 8px; margin-left: auto; border: solid #6e56f7; border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-2px); }
.lp-opt.is-sel .lp-native-name { margin-left: auto; }
.lp-empty { padding: 14px 10px; color: #8a86a6; font-size: 13px; text-align: center; }
.lp-foot { padding: 6px 10px 2px; border-top: 1px solid #f0eef8; margin-top: 6px; color: #9a96b4; font-size: 11.5px; }

html[data-theme="dark"] .lp-btn { background: #1b1930; border-color: rgba(167, 139, 250, .22); color: #ecebff; }
html[data-theme="dark"] .lp-btn svg { stroke: #a9a5c9; }
html[data-theme="dark"] .lp-pop { background: #1b1930; border-color: rgba(167, 139, 250, .22); box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .7); }
html[data-theme="dark"] .lp-search { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .lp-search input { color: #ecebff; }
html[data-theme="dark"] .lp-opt { color: #e6e4f8; }
html[data-theme="dark"] .lp-opt.is-auto { color: #b3a8ff; border-bottom-color: rgba(167, 139, 250, .18); }
html[data-theme="dark"] .lp-native-name { color: #9c98bd; }
html[data-theme="dark"] .lp-opt.is-active { background: rgba(139, 92, 246, .16); }
html[data-theme="dark"] .lp-opt.is-sel { background: rgba(139, 92, 246, .26); color: #fff; }
html[data-theme="dark"] .lp-opt.is-sel::after { border-color: #b3a8ff; }
html[data-theme="dark"] .lp-foot { border-top-color: rgba(255, 255, 255, .06); color: #8d89ad; }

/* switch */
.pf-switch-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; padding: 7px 12px; border: 1px solid #e3e0f3; border-radius: 12px; background: #fff; cursor: pointer; user-select: none; font-weight: 400 !important; transition: border-color .15s, background-color .15s; }
.pf-switch-row:hover { border-color: #cfc8f5; }
.pf-switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pf-switch { position: relative; flex: 0 0 36px; width: 36px; height: 20px; border-radius: 999px; background: #d9d6ea; transition: background-color .2s; }
.pf-switch__knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 16, 60, .3); transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); }
.pf-switch-input:checked + .pf-switch { background: linear-gradient(135deg, #5b45e0, #8b7bff); }
.pf-switch-input:checked + .pf-switch .pf-switch__knob { transform: translateX(16px); }
.pf-switch-input:focus-visible + .pf-switch { box-shadow: 0 0 0 4px rgba(110, 86, 247, .2); }
.pf-switch-input:checked ~ .pf-switch-text strong { color: #2d2a6e; }
.pf-switch-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pf-switch-text strong { font-size: 13px; font-weight: 650; color: #3f3b62; }
.pf-switch-text small { font-size: 11.5px; color: #8a86a6; }
html[data-theme="dark"] .pf-switch-row { background: #1b1930; border-color: rgba(167, 139, 250, .22); }
html[data-theme="dark"] .pf-switch { background: rgba(255, 255, 255, .16); }
html[data-theme="dark"] .pf-switch-text strong, html[data-theme="dark"] .pf-switch-input:checked ~ .pf-switch-text strong { color: #ecebff; }
html[data-theme="dark"] .pf-switch-text small { color: #9c98bd; }
.pf-switch, .pf-switch__knob { display: block; }
.pf-switch-row { margin-top: 0; }
.lp .lp-search input:not(#lp-x), .lp .lp-search input:not(#lp-x):focus {
  height: 30px !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; outline: none !important;
  box-shadow: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important;
}
.lp .lp-search:focus-within { box-shadow: 0 0 0 2px rgba(110, 86, 247, .35); }
.lp .lp-search input::-webkit-search-cancel-button { cursor: pointer; }
label.pf-switch-row:not(#lp-x) { display: flex !important; flex-direction: row !important; align-items: center !important; width: 100%; font-size: inherit; }
label.pf-switch-row:not(#lp-x) .pf-switch-text { flex: 1 1 auto; text-align: left; }

/* Batch 6, item 13: the same picker for every dropdown (static/assets/js/app/pf-select.js). */
.lp--plain .lp-btn { height: 44px; padding: 0 14px; font-weight: 500; font-size: 14px; }
.lp--plain .lp-val { color: inherit; }
.lp-pop { z-index: 2000; }
.lp-pop.is-up { animation-name: lpUp; }
@keyframes lpUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.lp-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9a96b4; list-style: none; }
.lp-opt.is-off { opacity: .45; cursor: not-allowed; }
.lp.is-disabled .lp-btn { opacity: .6; cursor: not-allowed; background: #f6f5fb; }
.lp-opt { transition: background-color .12s; }
.lp-opt:hover { background: #f5f3ff; }
html[data-theme="dark"] .lp-opt:hover { background: rgba(139, 92, 246, .12); }
html[data-theme="dark"] .lp-group { color: #8d89ad; }
html[data-theme="dark"] .lp.is-disabled .lp-btn { background: rgba(255, 255, 255, .04); }
/* Batch 6: [hidden] must win over the display rules above (search box on short lists, empty note) */
.lp [hidden], .lp-pop[hidden] { display: none !important; }
