/* IAVOX Studio 0.5.2 — viewport real, Roteiro estilo GPT e Studio Pro completo */
html:has(#emr-app),body:has(#emr-app){width:100%!important;height:100%!important;min-height:0!important;margin:0!important;overflow:hidden!important}
#emr-app{
  position:fixed!important;
  inset:0!important;
  z-index:10!important;
  width:100vw!important;
  max-width:none!important;
  height:100dvh!important;
  min-height:0!important;
  margin:0!important;
  overflow:hidden!important;
}
body.admin-bar #emr-app{top:32px!important;height:calc(100dvh - 32px)!important}
#emr-app .emr-nav{height:50px!important;min-height:50px!important}
#emr-app .emr-main{height:calc(100% - 50px)!important;min-height:0!important;overflow:hidden!important}
#emr-app .emr-panel,#emr-app .emr-studio-panel{height:100%!important;min-height:0!important;overflow:hidden!important}
#emr-app #emr-editor{display:block!important;width:100%!important;height:100%!important;min-height:0!important;border:0!important}

/* O resultado ocupa a lousa; o compositor permanece grande e fixo embaixo. */
#emr-app .emr-script-panel,#emr-app .emr-script-room{height:100%!important;min-height:0!important;overflow:hidden!important}
#emr-app .emr-script-room,
#emr-app .emr-script-room:has(.emr-result:not([hidden])){
  grid-template-rows:minmax(0,1fr) 205px!important;
}
#emr-app .emr-script-output,
#emr-app .emr-script-room:has(.emr-result:not([hidden])) .emr-script-output{
  min-height:0!important;
  padding:10px 18px!important;
  place-items:stretch!important;
  overflow:hidden!important;
}
#emr-app .emr-script-empty{align-self:center!important;justify-self:center!important;transform:none!important}
#emr-app .emr-composer{
  position:relative!important;
  align-self:stretch!important;
  width:calc(100% - 24px)!important;
  height:197px!important;
  min-height:197px!important;
  margin:0 12px 8px!important;
  padding:10px 14px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:44px minmax(0,1fr)!important;
  gap:8px!important;
  overflow:hidden!important;
}
#emr-app .emr-controls{grid-column:1!important;grid-row:1!important;min-width:0!important;margin:0!important}
#emr-app .emr-idea{grid-column:1!important;grid-row:2!important;min-width:0!important;min-height:0!important;margin:0!important}
#emr-app .emr-idea textarea{width:100%!important;height:100%!important;min-height:0!important;padding:14px 235px 14px 15px!important;resize:none!important}
#emr-app .emr-actions{position:absolute!important;right:22px!important;bottom:22px!important;z-index:3!important;width:205px!important;height:48px!important;min-height:48px!important;margin:0!important;display:block!important}
#emr-app .emr-actions .emr-primary{width:205px!important;height:48px!important;min-width:205px!important;min-height:48px!important;padding:7px 10px!important;font-size:10px!important;line-height:1.15!important;white-space:normal!important}
#emr-app .emr-status{position:absolute!important;right:0!important;bottom:-16px!important;width:205px!important;font-size:8px!important}
#emr-app .emr-result{width:100%!important;max-width:none!important;height:100%!important;min-height:0!important;padding:0!important;gap:6px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
#emr-app .emr-result-head{padding:0 4px!important}
#emr-app .emr-result textarea{min-height:0!important;border:0!important;border-radius:0!important;background:transparent!important;padding:14px 12px!important;font-size:16px!important;line-height:1.55!important}
#emr-app .emr-result-actions{padding-bottom:2px!important}

@media(max-width:782px){
  body.admin-bar #emr-app{top:46px!important;height:calc(100dvh - 46px)!important}
}
@media(max-width:760px){
  #emr-app .emr-script-room,#emr-app .emr-script-room:has(.emr-result:not([hidden])){grid-template-rows:minmax(0,1fr) 255px!important}
  #emr-app .emr-composer{width:calc(100% - 14px)!important;height:248px!important;min-height:248px!important;margin:0 7px 7px!important;padding:8px!important;grid-template-rows:82px minmax(0,1fr)!important}
  #emr-app .emr-controls{grid-template-columns:1fr 1fr!important;grid-template-rows:repeat(2,1fr)!important}
  #emr-app .emr-idea textarea{padding-right:12px!important;padding-bottom:58px!important}
  #emr-app .emr-actions{right:16px!important;bottom:16px!important;width:190px!important;height:42px!important;min-height:42px!important}
  #emr-app .emr-actions .emr-primary{width:190px!important;height:42px!important;min-width:190px!important;min-height:42px!important}
}
