/* SyncTV launch-blocker theme and overlay fixes. Loaded after account-theme-v1.css. */

/* Keep the theme control inside the customer header instead of floating over it. */
#portalView .top-actions{flex-wrap:wrap;justify-content:flex-end;min-width:0}
#portalView .top-actions .synctv-theme-toggle{position:static;top:auto;right:auto;bottom:auto;z-index:auto;flex:0 0 auto;min-height:38px;padding:8px 11px;box-shadow:0 6px 14px rgba(26,39,64,.07)}

/* Shared dynamic surfaces that previously stayed white after dark mode was selected. */
html[data-synctv-theme="dark"] #portalView .transactions-count,
html[data-synctv-theme="dark"] #portalView .transactions-open,
html[data-synctv-theme="dark"] #portalView .transactions-empty,
html[data-synctv-theme="dark"] #portalView .workspace-tab,
html[data-synctv-theme="dark"] #portalView .workspace-panel,
html[data-synctv-theme="dark"] #portalView .transaction-row,
html[data-synctv-theme="dark"] #portalView .ala-tab,
html[data-synctv-theme="dark"] #portalView .ala-card,
html[data-synctv-theme="dark"] #portalView .ala-legacy-panel,
html[data-synctv-theme="dark"] #portalView .ala-loading,
html[data-synctv-theme="dark"] #portalView .addon-card,
html[data-synctv-theme="dark"] #portalView .addon-tool,
html[data-synctv-theme="dark"] #portalView .addon-provisioning-panel,
html[data-synctv-theme="dark"] #portalView .quick-card,
html[data-synctv-theme="dark"] #portalView .quick-card-body,
html[data-synctv-theme="dark"] #portalView .support-box,
html[data-synctv-theme="dark"] #portalView .security-card,
html[data-synctv-theme="dark"] #portalView .request-card{background:#141d2d!important;border-color:#2c3a53!important;color:#edf4ff!important;box-shadow:0 10px 28px rgba(0,0,0,.18)!important}

html[data-synctv-theme="dark"] #portalView .ala-feature,
html[data-synctv-theme="dark"] #portalView .ala-info,
html[data-synctv-theme="dark"] #portalView .ala-delivery-note,
html[data-synctv-theme="dark"] #portalView .ala-state,
html[data-synctv-theme="dark"] #portalView .transactions-count,
html[data-synctv-theme="dark"] #portalView .transactions-open,
html[data-synctv-theme="dark"] #portalView .transactions-empty{background:#101a2a!important;border-color:#2c3a53!important;color:#b8c6da!important}

html[data-synctv-theme="dark"] #portalView .ala-info p,
html[data-synctv-theme="dark"] #portalView .ala-feature,
html[data-synctv-theme="dark"] #portalView .ala-helper,
html[data-synctv-theme="dark"] #portalView .transactions-empty,
html[data-synctv-theme="dark"] #portalView .transaction-meta span,
html[data-synctv-theme="dark"] #portalView .transaction-main span{color:#aab7cc!important}

html[data-synctv-theme="dark"] #portalView .ala-service-icon{background:linear-gradient(145deg,#123047,#2c2850)!important}
html[data-synctv-theme="dark"] #portalView .ala-action:disabled{background:#22304a!important;color:#8290a8!important}
html[data-synctv-theme="dark"] #portalView .ala-close{color:#b8c6da!important}
html[data-synctv-theme="dark"] #portalView .ala-close:hover{background:#22304a!important;color:#ff9baa!important}
html[data-synctv-theme="dark"] #portalView .ala-return.success{background:#12372e!important;border-color:#22533f!important;color:#78e4ba!important}
html[data-synctv-theme="dark"] #portalView .ala-return.cancel{background:#3a2f16!important;border-color:#5a4822!important;color:#f1d68d!important}
html[data-synctv-theme="dark"] #portalView .ala-return.error{background:#44202b!important;border-color:#63303e!important;color:#ff9baa!important}

/* Option A: À La Carte remains in the sidebar, but opens as an in-screen modal overlay. */
body.ala-carte-modal-active{overflow:hidden!important}
#portalView .content.ala-carte-workspace-open{position:relative}
#portalView .content.ala-carte-workspace-open> :not(#alaCarteWorkspace){display:block!important}
#portalView .content.ala-carte-workspace-open>#alaCarteWorkspace{
  display:block!important;
  position:fixed!important;
  inset:0!important;
  z-index:8800!important;
  min-height:0!important;
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  margin:0!important;
  padding:clamp(18px,4vw,48px)!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  background:rgba(9,17,29,.72)!important;
  backdrop-filter:blur(9px);
}
#portalView #alaCarteWorkspace>*{width:min(1160px,100%);margin-left:auto;margin-right:auto}
#portalView #alaCarteWorkspace .ala-tabbar{position:sticky;top:0;z-index:3;margin:0 auto 14px!important;padding:8px 10px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.96);box-shadow:0 18px 44px rgba(9,17,29,.18);backdrop-filter:blur(12px)}
#portalView #alaCarteWorkspace .ala-tab{width:100%;min-width:0;border:0;border-bottom:0;border-radius:11px;background:transparent;box-shadow:none}
html[data-synctv-theme="dark"] #portalView #alaCarteWorkspace{background:rgba(3,8,18,.82)!important}
html[data-synctv-theme="dark"] #portalView #alaCarteWorkspace .ala-tabbar{background:rgba(20,29,45,.97)!important;border-color:#33435f!important;box-shadow:0 18px 48px rgba(0,0,0,.4)!important}

@media(max-width:1080px){
  #portalView .top-actions{gap:7px}
  #portalView .top-actions .ghost-btn{padding:9px 10px}
  #portalView .top-actions .synctv-theme-toggle{padding:8px 10px}
}
@media(max-width:760px){
  #portalView .top-actions .synctv-theme-toggle{position:static!important;right:auto!important;bottom:auto!important;min-height:36px;padding:7px 9px}
  #portalView .top-actions .synctv-theme-toggle span:last-child{display:none}
  #portalView .top-actions{flex-wrap:nowrap}
  #portalView .content.ala-carte-workspace-open>#alaCarteWorkspace{padding:12px!important}
  #portalView #alaCarteWorkspace .ala-tabbar{top:0}
}
