/* PixelCMS multilingual + admin locale UI — DEV120 */
html[data-edit="1"] #pxth-toolbar .pxth-sidebar-brand{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:10px!important;
  min-height:72px!important;
  padding:11px 11px 11px 14px!important;
  overflow:visible!important;
}
html[data-edit="1"] #pxth-toolbar .pxth-sidebar-brand::before{content:none!important;display:none!important}
html[data-edit="1"] #pxth-toolbar .pxth-sidebar-brand-main{min-width:0;display:flex;flex-direction:column;gap:4px}
html[data-edit="1"] #pxth-toolbar .pxth-sidebar-site-name{
  display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#111827;font:800 13px/1.25 Kanit,system-ui,sans-serif;
}
html[data-edit="1"] #pxth-toolbar .pxth-sidebar-core-version{
  display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:#64748b;font:500 11px/1.25 Kanit,system-ui,sans-serif;
}
html[data-edit="1"] #pxth-toolbar .pxth-sidebar-core-version small{font:inherit;color:inherit}
html[data-edit="1"] #pxth-toolbar .pxth-sidebar-brand-actions{display:flex;align-items:center;gap:0;flex:0 0 auto}
html[data-edit="1"] #pxth-toolbar .pxth-admin-language-row{
  position:relative!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
  width:62px!important;height:32px!important;margin:0!important;padding:0 9px!important;box-sizing:border-box!important;
  border:1px solid #cbd5e1!important;border-radius:8px!important;background:#fff!important;color:#111827!important;
  cursor:pointer!important;overflow:hidden!important;
}
html[data-edit="1"] #pxth-toolbar .pxth-admin-language-current{
  display:block!important;min-width:22px!important;color:#111827!important;
  font:800 12px/1 Kanit,system-ui,sans-serif!important;letter-spacing:.02em!important;pointer-events:none!important;
}
html[data-edit="1"] #pxth-toolbar .pxth-admin-language-row::after{
  content:"";width:7px;height:7px;border-right:2px solid #111827;border-bottom:2px solid #111827;
  transform:rotate(45deg) translateY(-2px);transform-origin:center;pointer-events:none;flex:0 0 auto;
}
html[data-edit="1"] #pxth-toolbar .pxth-admin-language-row select{
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
  margin:0!important;padding:0!important;border:0!important;opacity:0!important;cursor:pointer!important;appearance:auto!important;
}
html[data-edit="1"] #pxth-toolbar .pxth-admin-sr-only{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}

.pxth-language-settings-grid{display:grid;gap:12px}
.pxth-language-search-row{display:grid;grid-template-columns:1fr;gap:8px}
.pxth-language-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:330px;overflow:auto;padding:4px;border:1px solid #e5e7eb}
.pxth-language-choice{display:flex!important;gap:8px;align-items:center;padding:8px!important;border:1px solid #eef2f7;background:#fff;margin:0!important}
.pxth-language-choice input{width:auto!important}
.pxth-language-choice span{display:flex;flex-direction:column}
.pxth-language-choice small{color:#64748b;font-size:11px}

@media(max-width:680px){.pxth-language-list{grid-template-columns:1fr}}

/* DEV130 — compact locale selector. Flags are visual cues; labels remain the language identity. */
.pxth-language-flag,
.pxth-language-switcher-flag{
  display:block;flex:0 0 auto;width:20px;height:15px;object-fit:contain;
}
.pxth-language-choice{grid-template-columns:auto auto minmax(0,1fr)}
.pxth-language-choice .pxth-language-flag--choice{margin-inline:1px}
.pxth-default-language-select{
  background-repeat:no-repeat!important;background-position:12px 50%!important;background-size:20px 15px!important;
  padding-inline-start:40px!important;
}

/* Editor content language: one compact dropdown row instead of a row of tabs. */
.pxth-content-language-tabs{padding:8px 12px;border-bottom:1px solid rgba(148,163,184,.18)}
.pxth-content-language-compact{display:flex;align-items:center;gap:7px;min-width:0}
.pxth-content-language-compact .pxth-language-flag--content{width:18px;height:13px}
.pxth-content-language-select{
  width:100%;min-width:0;height:32px;padding:4px 30px 4px 9px;border:1px solid #334155;background:#fff;color:#111827;
  border-radius:6px;font:600 12px/1.2 Kanit,system-ui,sans-serif;cursor:pointer;
}

/* Public selector: compact one-line `Native(CODE)` like common website language menus. */
.pxth-public-language-switcher{
  position:fixed;right:max(14px,env(safe-area-inset-right));top:max(14px,env(safe-area-inset-top));bottom:auto;
  z-index:2147482000;width:auto;min-width:0;padding:0;border:0;background:transparent;box-shadow:none;
  font-family:Kanit,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.pxth-public-language-switcher>summary{list-style:none}
.pxth-public-language-switcher>summary::-webkit-details-marker{display:none}
.pxth-language-switcher-trigger{
  display:flex;align-items:center;gap:6px;min-height:34px;padding:5px 8px;background:#fff;color:#0f172a;
  border:1px solid #dbe4ef;border-radius:7px;box-shadow:0 6px 20px rgba(15,23,42,.14);cursor:pointer;user-select:none;
}
.pxth-language-switcher-current{font-size:12px;font-weight:600;line-height:1.2;white-space:nowrap}
.pxth-language-switcher-code{display:none}
.pxth-language-switcher-chevron{width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);margin-inline-start:1px}
.pxth-public-language-switcher[open] .pxth-language-switcher-chevron{transform:rotate(225deg) translate(-1px,-1px)}
.pxth-language-switcher-menu{
  position:absolute;right:0;top:calc(100% + 6px);width:max-content;min-width:150px;max-width:min(240px,calc(100vw - 20px));max-height:min(360px,70vh);overflow:auto;
  padding:4px;background:#fff;border:1px solid #dbe4ef;border-radius:8px;box-shadow:0 14px 34px rgba(15,23,42,.20);
}
.pxth-language-switcher-item{
  display:grid;grid-template-columns:20px minmax(0,1fr) 16px;align-items:center;gap:7px;min-height:34px;padding:5px 7px;
  color:#0f172a;text-decoration:none;border-radius:6px;
}
.pxth-language-switcher-item:hover,.pxth-language-switcher-item:focus-visible{background:#f1f5f9;outline:none}
.pxth-language-switcher-item.is-active{background:#eff6ff}
.pxth-language-switcher-label{display:block;min-width:0;font-size:12px;font-weight:600;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pxth-language-switcher-check{color:#2563eb;font-size:14px;font-weight:800;text-align:center}
@media(max-width:680px){
  .pxth-public-language-switcher{right:max(8px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top))}
  .pxth-language-switcher-trigger{min-height:32px;padding:4px 7px;gap:5px}
  .pxth-language-switcher-current{display:block;font-size:11px}
  .pxth-language-switcher-menu{min-width:145px;max-width:min(220px,calc(100vw - 16px))}
}
