/* Final UI polish from the latest IDE review. */

/* Give the problem navigator more visual weight. */
body.hdlforge-ide-active .ide-problem-drawer{
  width:min(430px,calc(100vw - 32px))!important;
}
body.hdlforge-ide-active .ide-drawer-header{
  height:70px!important;
  flex-basis:70px!important;
  padding:0 18px!important;
}
body.hdlforge-ide-active .ide-drawer-eyebrow{
  font-size:10px!important;
  letter-spacing:.11em!important;
}
body.hdlforge-ide-active .ide-drawer-header strong{
  font-size:18px!important;
}
body.hdlforge-ide-active .ide-drawer-close{
  width:34px!important;
  height:34px!important;
  font-size:20px!important;
}
body.hdlforge-ide-active .ide-drawer-search{
  height:48px!important;
  flex-basis:48px!important;
  margin:12px 12px 8px!important;
  padding:0 13px!important;
}
body.hdlforge-ide-active .ide-drawer-search input{
  font-size:14px!important;
}
body.hdlforge-ide-active .ide-drawer-groups{
  padding:6px 12px 16px!important;
}
body.hdlforge-ide-active .ide-drawer-group-title{
  height:32px!important;
  padding:0 10px!important;
  font-size:11px!important;
}
body.hdlforge-ide-active .ide-drawer-group-title em{
  font-size:10px!important;
}
body.hdlforge-ide-active .ide-drawer-list{
  gap:5px!important;
}
body.hdlforge-ide-active .ide-drawer-problem{
  min-height:58px!important;
  grid-template-columns:24px minmax(0,1fr) auto!important;
  gap:12px!important;
  padding:9px 10px!important;
}
body.hdlforge-ide-active .ide-drawer-status{
  width:20px!important;
  height:20px!important;
  font-size:10px!important;
}
body.hdlforge-ide-active .ide-drawer-copy{
  gap:4px!important;
}
body.hdlforge-ide-active .ide-drawer-copy strong{
  font-size:13px!important;
}
body.hdlforge-ide-active .ide-drawer-copy small{
  font-size:10px!important;
}
body.hdlforge-ide-active .ide-drawer-difficulty{
  font-size:10px!important;
}

/* Keep the main IDE header compact. */
body.hdlforge-ide-active .ide-page .ide-topbar{
  height:48px!important;
  min-height:48px!important;
  flex-basis:48px!important;
}

/* Account control is icon-only. */
body.hdlforge-ide-active .ide-topbar-signin{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  padding:0!important;
  gap:0!important;
  display:grid!important;
  place-items:center!important;
  font-size:0!important;
}
body.hdlforge-ide-active .ide-topbar-signin span{
  display:none!important;
}
body.hdlforge-ide-active .ide-topbar-signin svg{
  width:20px!important;
  height:20px!important;
}

/* Language control: no underline or click/focus border. */
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language){
  justify-content:flex-start!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language{
  margin-left:0!important;
  flex:0 0 205px!important;
  box-shadow:none!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language select,
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language select:focus,
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language select:focus-visible,
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language select:active{
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
}

/* Keep reset beside the language control instead of isolating it on the far right. */
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language)>.icon-btn{
  position:static!important;
  flex:0 0 32px!important;
  margin:auto 0 auto 4px!important;
  inset:auto!important;
}

/* Put the collapse chevron immediately after Console instead of floating on its left. */
body.hdlforge-ide-active .ide-page .bottom-tabs{
  position:relative!important;
}
body.hdlforge-ide-active .ide-page .bottom-tabs>button:first-child{
  order:1!important;
  padding-left:14px!important;
  padding-right:8px!important;
  gap:0!important;
}
body.hdlforge-ide-active .ide-page .bottom-tabs .bottom-collapse{
  position:static!important;
  order:2!important;
  width:24px!important;
  min-width:24px!important;
  height:100%!important;
  min-height:0!important;
  margin:0 6px 0 -8px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  background:transparent!important;
  color:#999!important;
  box-shadow:none!important;
  font-size:0!important;
}
body.hdlforge-ide-active .ide-page .bottom-tabs .bottom-collapse:hover{
  background:transparent!important;
  color:#fff!important;
}
body.hdlforge-ide-active .ide-page .bottom-tabs>button:nth-child(2):not(.bottom-collapse){order:3!important}
body.hdlforge-ide-active .ide-page .bottom-tabs>button:nth-child(3):not(.bottom-collapse){order:4!important}

/* Let the editor surface use the full workspace cleanly. */
body.hdlforge-ide-active .ide-page .editor-wrap,
body.hdlforge-ide-active .ide-page .monaco-editor-stage,
body.hdlforge-ide-active .ide-page .monaco-editor,
body.hdlforge-ide-active .ide-page .monaco-editor .overflow-guard{
  width:100%!important;
  max-width:none!important;
}

/* Slightly denser statement and language headers. */
body.hdlforge-ide-active .ide-page .ide-problem>.problem-tabs{
  height:45px!important;
  flex-basis:45px!important;
}
body.hdlforge-ide-active .ide-page .problem-tabs button{
  font-size:14px!important;
}
body.hdlforge-ide-active .ide-page .file-tabs{
  height:43px!important;
  flex-basis:43px!important;
}
body.hdlforge-ide-active .ide-page .file-tabs .icon-btn,
body.hdlforge-ide-active .ide-page .file-tabs .editor-find-btn{
  height:43px!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language select{
  font-size:13px!important;
}
body.hdlforge-ide-active .ide-page .problem-heading h1{
  font-size:29px!important;
}

/* Remove the divider lines immediately above and below the task description. */
body.hdlforge-ide-active .ide-page .problem-heading{
  border-bottom:0!important;
}
body.hdlforge-ide-active .ide-page .problem-section.first p{
  border-bottom:0!important;
}

/* Keep the language chevron attached to the selected label, even for short labels such as VHDL. */
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language{
  position:relative!important;
  flex:1 1 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:100%!important;
  padding:0 0 0 18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  overflow:visible!important;
  box-shadow:none!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language::before{
  position:static!important;
  flex:0 0 auto!important;
  left:auto!important;
  top:auto!important;
  margin:0!important;
  transform:none!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language select{
  position:static!important;
  inset:auto!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  field-sizing:content!important;
  border:0!important;
  border-radius:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language) .editor-language::after{
  position:static!important;
  flex:0 0 7px!important;
  right:auto!important;
  top:auto!important;
  width:7px!important;
  height:7px!important;
  margin:0 0 4px 0!important;
  border:0!important;
  border-right:1.5px solid #999!important;
  border-bottom:1.5px solid #999!important;
  transform:rotate(45deg)!important;
  pointer-events:none!important;
}

/* Reset and search live together at the far right of the language bar. */
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language)>.icon-btn,
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language)>.editor-find-btn{
  position:static!important;
  flex:0 0 32px!important;
  inset:auto!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language)>.icon-btn{
  order:2!important;
  margin:auto 4px auto 8px!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language)>.editor-find-btn{
  order:3!important;
  width:32px!important;
  min-width:32px!important;
  margin:auto 10px auto 0!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#aaa!important;
  cursor:pointer!important;
}
body.hdlforge-ide-active .ide-page .file-tabs:has(.editor-language)>.editor-find-btn:hover{
  background:#303030!important;
  color:#fff!important;
}

@media(max-width:720px){
  body.hdlforge-ide-active .ide-problem-drawer{
    width:calc(100vw - 20px)!important;
    left:10px!important;
  }
}