/* Web/MSX overrides; retain the original Samsung Zuno layout and identity. */
html, body { background:#071c30 !important; }
body.msx-tv #avPlayer,
body.msx-tv #avPlayer.full-surface,
body.msx-tv #avPlayer.preview-surface {
  pointer-events:none !important;
  background:#000 !important;
  display:block !important;
  opacity:1 !important;
  visibility:visible !important;
}
body.msx-tv #avPlayer.preview-surface { z-index:80 !important; }
body.msx-tv #avPlayer.full-surface { z-index:1 !important; }
body.msx-tv #avPlayer:not(.preview-surface):not(.full-surface) {
  display:none !important;
  visibility:hidden !important;
}

/* Login MSX: colunas em flex (inclusive webOS sem suporte a CSS Grid).
   A geometria e definida apenas aqui; nao usar inline left/transform via JS. */
body.msx-tv #stage #loginView.ps-restored-login:not(.keyboard-docked) .ps-login-layout {
  position:absolute !important;
  left:350px !important;
  top:116px !important;
  right:auto !important;
  bottom:auto !important;
  width:1220px !important;
  height:auto !important;
  margin:0 !important;
  transform:none !important;
  -webkit-transform:none !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-login-brand-only {
  width:100% !important;
  height:156px !important;
  margin:0 0 12px !important;
  display:-webkit-box !important;
  display:-webkit-flex !important;
  display:flex !important;
  -webkit-box-align:center !important;
  -webkit-align-items:center !important;
  align-items:center !important;
  -webkit-box-pack:center !important;
  -webkit-justify-content:center !important;
  justify-content:center !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-login-logo {
  width:250px !important;
  height:148px !important;
}
body.msx-tv #stage #loginView.ps-restored-login:not(.keyboard-docked) .ps-login-card {
  box-sizing:border-box !important;
  width:1220px !important;
  height:630px !important;
  min-height:630px !important;
  max-height:630px !important;
  padding:30px 32px !important;
  display:-webkit-box !important;
  display:-webkit-flex !important;
  display:flex !important;
  -webkit-box-orient:horizontal !important;
  -webkit-flex-direction:row !important;
  flex-direction:row !important;
  -webkit-box-align:stretch !important;
  -webkit-align-items:stretch !important;
  align-items:stretch !important;
  grid-template-columns:none !important;
  gap:0 !important;
  transform:none !important;
  -webkit-transform:none !important;
  overflow:hidden !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-login-card .ps-login-left {
  width:54% !important;
  -webkit-box-flex:1 !important;
  -webkit-flex:1 1 54% !important;
  flex:1 1 54% !important;
  min-width:0 !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-login-card .ps-login-divider {
  display:block !important;
  width:1px !important;
  height:auto !important;
  -webkit-flex:0 0 1px !important;
  flex:0 0 1px !important;
  margin:0 26px !important;
  -webkit-align-self:stretch !important;
  align-self:stretch !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-login-card .ps-device-side {
  width:42% !important;
  -webkit-box-flex:1 !important;
  -webkit-flex:1 1 42% !important;
  flex:1 1 42% !important;
  min-width:0 !important;
  display:-webkit-box !important;
  display:-webkit-flex !important;
  display:flex !important;
  -webkit-box-orient:vertical !important;
  -webkit-flex-direction:column !important;
  flex-direction:column !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-config-row {
  display:-webkit-box !important;
  display:-webkit-flex !important;
  display:flex !important;
  -webkit-box-align:center !important;
  -webkit-align-items:center !important;
  align-items:center !important;
  grid-template-columns:none !important;
  gap:0 !important;
  width:100% !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-config-row .ps-qr-wrap {
  box-sizing:border-box !important;
  width:146px !important;
  height:146px !important;
  -webkit-box-flex:0 !important;
  -webkit-flex:0 0 146px !important;
  flex:0 0 146px !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-config-row .ps-config-copy {
  -webkit-box-flex:1 !important;
  -webkit-flex:1 1 0 !important;
  flex:1 1 0 !important;
  min-width:0 !important;
  margin-left:16px !important;
  overflow-wrap:break-word !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-config-copy strong {
  white-space:normal !important;
  word-break:break-word !important;
  font-size:16px !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-login-field {
  height:70px !important;
  margin:0 0 12px !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-login-field input {
  height:66px !important;
  line-height:66px !important;
  font-size:24px !important;
}
body.msx-tv #stage #loginView.ps-restored-login .ps-login-button {
  height:64px !important;
  font-size:22px !important;
}
/* O teclado virtual e um estado temporario; nao reposicionar o cartao alem
   da margem segura quando um campo recebe foco. */
body.msx-tv #stage #loginView.ps-restored-login.keyboard-open:not(.keyboard-docked) .ps-login-layout {
  top:78px !important;
}
body.msx-tv #stage #loginView.ps-restored-login.keyboard-open:not(.keyboard-docked) .ps-login-brand-only {
  display:none !important;
}

/* Navegadores antigos nao implementam CSS Grid, usado no Home e catalogo. */
body.msx-no-grid #stage #homeView .home-main,
body.msx-no-grid #stage #homeView .home-cards,
body.msx-no-grid #stage #catalogView #catalogBody {
  display:-webkit-box !important;
  display:-webkit-flex !important;
  display:flex !important;
  -webkit-box-orient:horizontal !important;
  -webkit-flex-direction:row !important;
  flex-direction:row !important;
}
body.msx-no-grid #stage #homeView .home-main { -webkit-align-items:center !important; align-items:center !important; }
body.msx-no-grid #stage #homeView .home-cards {
  -webkit-box-flex:1 !important;
  -webkit-flex:1 1 auto !important;
  flex:1 1 auto !important;
  min-width:0 !important;
  margin-right:22px !important;
}
body.msx-no-grid #stage #homeView .home-cards .home-card {
  -webkit-box-flex:1 !important;
  -webkit-flex:1 1 0 !important;
  flex:1 1 0 !important;
  min-width:0 !important;
  margin-right:12px !important;
}
body.msx-no-grid #stage #homeView .account-panel { -webkit-flex:0 0 400px !important; flex:0 0 400px !important; }
body.msx-no-grid #stage #catalogView #catalogBody > .category-panel { -webkit-flex:0 0 420px !important; flex:0 0 420px !important; min-width:0 !important; }
body.msx-no-grid #stage #catalogView #catalogBody > .content-panel { -webkit-box-flex:1 !important; -webkit-flex:1 1 0 !important; flex:1 1 0 !important; min-width:0 !important; }
body.msx-no-grid #stage #catalogView #catalogBody > .detail-panel { -webkit-flex:0 0 730px !important; flex:0 0 730px !important; min-width:0 !important; }
body.msx-no-grid #stage #catalogView #catalogBody .quick-filters { display:-webkit-flex !important; display:flex !important; }
body.msx-no-grid #stage #catalogView #catalogBody .quick-filters > button { -webkit-box-flex:1 !important; -webkit-flex:1 1 0 !important; flex:1 1 0 !important; min-width:0 !important; }
body.msx-no-grid #stage #catalogView #catalogBody #contentWindow {
  display:-webkit-flex !important;
  display:flex !important;
  -webkit-flex-wrap:wrap !important;
  flex-wrap:wrap !important;
  -webkit-align-content:flex-start !important;
  align-content:flex-start !important;
}
body.msx-no-grid #stage #catalogView #catalogBody #contentWindow.live-grid { -webkit-flex-direction:column !important; flex-direction:column !important; }
body.msx-no-grid #stage #catalogView #catalogBody #contentWindow.live-grid > .media-card {
  -webkit-flex:0 0 14.5% !important;
  flex:0 0 14.5% !important;
  width:100% !important;
  margin-bottom:10px !important;
}
body.msx-no-grid #stage #catalogView #catalogBody #contentWindow.poster-grid > .media-card {
  -webkit-flex:0 0 22% !important;
  flex:0 0 22% !important;
  width:22% !important;
  margin:0 1.5% 18px !important;
  display:-webkit-flex !important;
  display:flex !important;
  -webkit-flex-direction:column !important;
  flex-direction:column !important;
}
body.msx-no-grid #stage #catalogView #catalogBody #contentWindow.poster-grid .media-art {
  -webkit-box-flex:1 !important;
  -webkit-flex:1 1 0 !important;
  flex:1 1 0 !important;
  height:auto !important;
  min-height:0 !important;
}
body.msx-no-grid #stage #catalogView #catalogBody #contentWindow.poster-grid .media-copy {
  -webkit-flex:0 0 82px !important;
  flex:0 0 82px !important;
  height:82px !important;
}

/* Limite renderizacao cara nos aparelhos antigos sem esconder recursos. */
body.msx-performance-lite #stage .media-card,
body.msx-performance-lite #stage .ps-login-card,
body.msx-performance-lite #stage .home-card,
body.msx-performance-lite #stage .detail-card,
body.msx-performance-lite #stage .player-options {
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  filter:none !important;
}
body.msx-performance-lite #stage .media-card,
body.msx-performance-lite #stage .media-card *,
body.msx-performance-lite #stage .home-card,
body.msx-performance-lite #stage .home-card * {
  animation:none !important;
  transition:none !important;
}
