/* =========================================================
   MSB Polylang Switcher — TV Repair by Meryosab
   Uses the site's --tvr-* design tokens when available.
   ========================================================= */

.switch-poly-msb-root,
.switch-poly-msb-root *{
  box-sizing:border-box!important;
}

.switch-poly-msb-root{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0!important;
  font-family:var(--tvr-font,Inter,"Segoe UI",Roboto,Arial,Helvetica,sans-serif)!important;
  line-height:1!important;
}

.switch-poly-msb-root--portal{
  position:fixed!important;
  left:0!important;
  top:0!important;
  width:0!important;
  height:0!important;
  overflow:visible!important;
  pointer-events:none!important;
  z-index:-1!important;
}

.switch-poly-msb-root--portal>.switch-poly-msb-trigger{
  display:none!important;
}

.switch-poly-msb-trigger{
  min-width:58px!important;
  height:36px!important;
  min-height:36px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  margin:0!important;
  padding:0 10px!important;
  border:1px solid var(--tvr-line,rgba(16,38,65,.10))!important;
  border-radius:9px!important;
  background:var(--tvr-control-bg,rgba(255,255,255,.025))!important;
  color:var(--tvr-muted,#52667e)!important;
  box-shadow:none!important;
  font:700 12.5px/1 var(--tvr-font,Inter,"Segoe UI",Roboto,Arial,Helvetica,sans-serif)!important;
  text-decoration:none!important;
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  transition:background var(--tvr-ease,180ms ease),border-color var(--tvr-ease,180ms ease),color var(--tvr-ease,180ms ease)!important;
}

.switch-poly-msb-trigger:hover,
.switch-poly-msb-trigger[aria-expanded="true"]{
  background:var(--tvr-accent-soft,rgba(8,127,135,.09))!important;
  border-color:color-mix(in srgb,var(--tvr-accent,#087f87) 38%,var(--tvr-line,transparent))!important;
  color:var(--tvr-accent,#087f87)!important;
}

.switch-poly-msb-trigger:focus-visible{
  outline:2px solid var(--tvr-accent,#087f87)!important;
  outline-offset:2px!important;
}

.switch-poly-msb-trigger-flag{
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  overflow:hidden!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  background-size:cover!important;
  background-color:var(--tvr-surface-2,#e5eaee)!important;
  box-shadow:0 0 0 1px var(--tvr-line,rgba(16,38,65,.10))!important;
}

.switch-poly-msb-trigger-flag-text{
  color:var(--tvr-accent,#087f87)!important;
  font-size:8px!important;
  font-weight:850!important;
  letter-spacing:0!important;
}

.switch-poly-msb-current-code{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:currentColor!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  text-transform:uppercase!important;
}

.switch-poly-msb-modal{
  position:fixed!important;
  inset:0!important;
  z-index:2147482500!important;
  width:100vw!important;
  max-width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  display:none!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:20px!important;
  font-family:var(--tvr-font,Inter,"Segoe UI",Roboto,Arial,Helvetica,sans-serif)!important;
  pointer-events:auto!important;
  isolation:isolate!important;
}

.switch-poly-msb-modal.switch-poly-msb-open{
  display:flex!important;
}

.switch-poly-msb-overlay{
  position:absolute!important;
  inset:0!important;
  background:rgba(3,8,16,.64)!important;
  backdrop-filter:blur(6px)!important;
  -webkit-backdrop-filter:blur(6px)!important;
  opacity:0;
}

.switch-poly-msb-open .switch-poly-msb-overlay{
  animation:switchPolyMsbOverlayIn .18s ease forwards!important;
}

.switch-poly-msb-is-closing .switch-poly-msb-overlay{
  animation:switchPolyMsbOverlayOut .16s ease forwards!important;
}

.switch-poly-msb-dialog{
  position:relative!important;
  z-index:2!important;
  width:min(560px,calc(100vw - 40px))!important;
  max-width:560px!important;
  max-height:min(720px,calc(100dvh - 40px))!important;
  margin:0!important;
  padding:18px!important;
  overflow:auto!important;
  border:1px solid var(--tvr-line-strong,rgba(16,38,65,.18))!important;
  border-radius:16px!important;
  background:
    radial-gradient(circle at 12% 0%,color-mix(in srgb,var(--tvr-accent,#087f87) 9%,transparent),transparent 34%),
    var(--tvr-surface,#fff)!important;
  color:var(--tvr-text,#17263a)!important;
  box-shadow:var(--tvr-shadow,0 24px 70px rgba(0,0,0,.28))!important;
  opacity:0;
  transform-origin:center!important;
}

.switch-poly-msb-open .switch-poly-msb-dialog{
  animation:switchPolyMsbDialogIn .24s cubic-bezier(.2,.9,.2,1) forwards!important;
}

.switch-poly-msb-is-closing .switch-poly-msb-dialog{
  animation:switchPolyMsbDialogOut .16s ease forwards!important;
}

.switch-poly-msb-header{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:16px!important;
  margin:0 0 14px!important;
  padding:0 0 14px!important;
  border-bottom:1px solid var(--tvr-line,rgba(16,38,65,.10))!important;
}

.switch-poly-msb-header-text{
  min-width:0!important;
  flex:1 1 auto!important;
}

.switch-poly-msb-eyebrow{
  margin:0 0 5px!important;
  color:var(--tvr-accent,#087f87)!important;
  font-size:10.5px!important;
  font-weight:850!important;
  line-height:1.25!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}

.switch-poly-msb-title{
  margin:0!important;
  padding:0!important;
  color:var(--tvr-text,#17263a)!important;
  font:850 23px/1.15 var(--tvr-font,Inter,"Segoe UI",Roboto,Arial,Helvetica,sans-serif)!important;
  letter-spacing:-.025em!important;
}

.switch-poly-msb-subtitle{
  margin:6px 0 0!important;
  padding:0!important;
  color:var(--tvr-muted,#52667e)!important;
  font-size:13px!important;
  line-height:1.45!important;
}

.switch-poly-msb-close{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:0!important;
  border:1px solid var(--tvr-line,rgba(16,38,65,.10))!important;
  border-radius:9px!important;
  background:var(--tvr-control-bg,transparent)!important;
  color:var(--tvr-muted,#52667e)!important;
  cursor:pointer!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  transition:background var(--tvr-ease,180ms ease),border-color var(--tvr-ease,180ms ease),color var(--tvr-ease,180ms ease)!important;
}

.switch-poly-msb-close svg{
  width:17px!important;
  height:17px!important;
  display:block!important;
}

.switch-poly-msb-close:hover,
.switch-poly-msb-close:focus-visible{
  background:var(--tvr-accent-soft,rgba(8,127,135,.09))!important;
  border-color:color-mix(in srgb,var(--tvr-accent,#087f87) 40%,var(--tvr-line,transparent))!important;
  color:var(--tvr-accent,#087f87)!important;
}

.switch-poly-msb-flags{
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  margin:0!important;
  padding:0!important;
}

.switch-poly-msb-flag-button,
.switch-poly-msb-flag-button:link,
.switch-poly-msb-flag-button:visited{
  position:relative!important;
  min-width:0!important;
  min-height:58px!important;
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr) 24px!important;
  align-items:center!important;
  gap:10px!important;
  margin:0!important;
  padding:9px 10px!important;
  border:1px solid var(--tvr-line,rgba(16,38,65,.10))!important;
  border-radius:11px!important;
  background:var(--tvr-control-bg,rgba(255,255,255,.025))!important;
  color:var(--tvr-text,#17263a)!important;
  text-decoration:none!important;
  box-shadow:none!important;
  opacity:0;
  transform:translateY(8px);
  overflow:hidden!important;
  transition:background var(--tvr-ease,180ms ease),border-color var(--tvr-ease,180ms ease),transform var(--tvr-ease,180ms ease)!important;
}

.switch-poly-msb-open .switch-poly-msb-flag-button{
  animation:switchPolyMsbFlagIn .23s ease forwards!important;
}
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(1){animation-delay:.02s!important}
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(2){animation-delay:.04s!important}
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(3){animation-delay:.06s!important}
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(4){animation-delay:.08s!important}
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(5){animation-delay:.10s!important}
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(6){animation-delay:.12s!important}
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(7){animation-delay:.14s!important}
.switch-poly-msb-open .switch-poly-msb-flag-button:nth-child(8){animation-delay:.16s!important}

.switch-poly-msb-flag-button:hover,
.switch-poly-msb-flag-button:focus-visible{
  background:var(--tvr-accent-soft,rgba(8,127,135,.09))!important;
  border-color:color-mix(in srgb,var(--tvr-accent,#087f87) 42%,var(--tvr-line,transparent))!important;
  color:var(--tvr-text,#17263a)!important;
  transform:translateY(-1px)!important;
  outline:none!important;
}

.switch-poly-msb-flag-button-current,
.switch-poly-msb-flag-button-current:link,
.switch-poly-msb-flag-button-current:visited{
  background:color-mix(in srgb,var(--tvr-accent,#087f87) 9%,var(--tvr-control-bg,transparent))!important;
  border-color:color-mix(in srgb,var(--tvr-accent,#087f87) 46%,var(--tvr-line,transparent))!important;
}

.switch-poly-msb-flag-image{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:50%!important;
  overflow:hidden!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  background-size:cover!important;
  background-color:var(--tvr-surface-2,#e5eaee)!important;
  box-shadow:0 0 0 1px var(--tvr-line,rgba(16,38,65,.10))!important;
}

.switch-poly-msb-flag-image-text{
  color:var(--tvr-accent,#087f87)!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:0!important;
}

.switch-poly-msb-flag-copy{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
}

.switch-poly-msb-flag-copy strong{
  min-width:0!important;
  overflow:hidden!important;
  color:var(--tvr-text,#17263a)!important;
  font-size:13px!important;
  font-weight:750!important;
  line-height:1.15!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

.switch-poly-msb-flag-copy small{
  color:var(--tvr-dim,#7b8da1)!important;
  font-size:10px!important;
  font-weight:750!important;
  line-height:1!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}

.switch-poly-msb-current-mark{
  width:22px!important;
  height:22px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:7px!important;
  background:var(--tvr-accent,#087f87)!important;
  color:#fff!important;
}

.switch-poly-msb-current-mark svg{
  width:13px!important;
  height:13px!important;
}

.switch-poly-msb-flag-button:not(.switch-poly-msb-flag-button-current) .switch-poly-msb-current-mark{
  display:none!important;
}

.switch-poly-msb-screen-reader{
  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;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  border:0!important;
}

/* TV Repair header slots. The header owns the normal visual style; the plugin
   only adds open-state feedback and guarantees clickability. */
#tvr-language-slot,
#tvr-language-slot-mobile{
  cursor:pointer!important;
  pointer-events:auto!important;
}

#tvr-language-slot[aria-expanded="true"]{
  background:var(--tvr-surface-2,#e5eaee)!important;
  border-color:var(--tvr-line-strong,rgba(16,38,65,.18))!important;
  color:var(--tvr-text,#17263a)!important;
}

#tvr-language-slot-mobile[aria-expanded="true"]{
  background:var(--tvr-accent-soft,rgba(8,127,135,.09))!important;
  border-color:color-mix(in srgb,var(--tvr-accent,#087f87) 40%,var(--tvr-line,transparent))!important;
  color:var(--tvr-accent,#087f87)!important;
}

@media(max-width:700px){
  .switch-poly-msb-modal{
    align-items:flex-end!important;
    padding:10px!important;
  }

  .switch-poly-msb-dialog{
    width:100%!important;
    max-width:100%!important;
    max-height:min(82dvh,680px)!important;
    padding:16px!important;
    border-radius:16px 16px 13px 13px!important;
  }

  .switch-poly-msb-open .switch-poly-msb-dialog{
    animation:switchPolyMsbDialogMobileIn .24s cubic-bezier(.2,.9,.2,1) forwards!important;
  }

  .switch-poly-msb-is-closing .switch-poly-msb-dialog{
    animation:switchPolyMsbDialogMobileOut .16s ease forwards!important;
  }

  .switch-poly-msb-title{font-size:21px!important}
  .switch-poly-msb-subtitle{font-size:12.5px!important}
  .switch-poly-msb-flags{grid-template-columns:1fr!important;gap:7px!important}
  .switch-poly-msb-flag-button,
  .switch-poly-msb-flag-button:link,
  .switch-poly-msb-flag-button:visited{
    min-height:54px!important;
    padding:8px 10px!important;
  }
}

@media(max-width:390px){
  .switch-poly-msb-modal{padding:7px!important}
  .switch-poly-msb-dialog{padding:14px!important}
  .switch-poly-msb-header{gap:10px!important;margin-bottom:12px!important;padding-bottom:12px!important}
  .switch-poly-msb-title{font-size:20px!important}
  .switch-poly-msb-close{width:32px!important;height:32px!important;min-width:32px!important}
}

@media(prefers-reduced-motion:reduce){
  .switch-poly-msb-modal *,
  .switch-poly-msb-modal *::before,
  .switch-poly-msb-modal *::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

@keyframes switchPolyMsbOverlayIn{from{opacity:0}to{opacity:1}}
@keyframes switchPolyMsbOverlayOut{from{opacity:1}to{opacity:0}}
@keyframes switchPolyMsbDialogIn{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
@keyframes switchPolyMsbDialogOut{from{opacity:1;transform:none}to{opacity:0;transform:translateY(7px) scale(.99)}}
@keyframes switchPolyMsbFlagIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes switchPolyMsbDialogMobileIn{from{opacity:0;transform:translateY(100%)}to{opacity:1;transform:none}}
@keyframes switchPolyMsbDialogMobileOut{from{opacity:1;transform:none}to{opacity:0;transform:translateY(100%)}}
