.company-help-heading,
.company-help-section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.company-help-heading > h2,
.company-help-heading > h3,
.company-help-heading > h4 { flex: 1 1 220px; margin-bottom: 0; }
.company-help-heading { margin-bottom: 12px; }
.company-help-section-actions { margin: 10px 0; }

body .btn.company-help-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid #bd7d15;
  border-radius: 7px;
  background: #df971d;
  color: #102c3d;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

body .btn.company-help-button[hidden] { display: none !important; }
body .btn.company-help-button:hover { background: #efad3c; }
body .btn.company-help-button:focus-visible { outline: 3px solid #68b7ed; outline-offset: 3px; }

#company-help-dialog {
  box-sizing: border-box;
  width: min(1040px, calc(100% - 28px));
  max-width: calc(100% - 28px);
  max-height: calc(100% - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid #c8c9c3;
  border-radius: 12px;
  background: #fffefa;
  color: #102c3d;
  font-family: inherit;
}

#company-help-dialog::backdrop { background: rgb(16 37 50 / 68%); }
#company-help-dialog [hidden] { display: none !important; }

#company-help-dialog .company-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 4px solid #df971d;
  background: #102c3d;
  color: #fffefa;
}

#company-help-title {
  flex: 1 1 220px;
  margin: 0;
  color: inherit;
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

#company-help-dialog .company-help-actions,
#company-help-dialog .company-help-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

#company-help-dialog .company-help-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #bd7d15;
  border-radius: 7px;
  background: #df971d;
  color: #102c3d;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
}

#company-help-dialog .company-help-control:hover:not(:disabled) { background: #efad3c; }
#company-help-dialog .company-help-control:focus-visible { outline: 3px solid #68b7ed; outline-offset: 3px; }
#company-help-dialog .company-help-control:disabled { opacity: .5; cursor: default; }
#company-help-dialog .company-help-tools { padding: 10px 16px; border-bottom: 1px solid #c8c9c3; }
#company-help-status { flex: 1 1 180px; max-width: 660px; margin: 0; color: #102c3d; text-align: center; }
#company-help-page { height: min(70vh, 800px); overflow: auto; padding: 16px; background: #f4f0e6; }
#company-help-canvas { display: block; max-width: 100%; height: auto; margin: 0 auto; background: #fff; }

@media (max-width: 520px) {
  #company-help-dialog { width: calc(100% - 12px); max-width: calc(100% - 12px); max-height: calc(100% - 12px); }
  #company-help-dialog .company-help-header { padding: 10px; }
  #company-help-dialog .company-help-actions { justify-content: flex-start; }
  #company-help-dialog .company-help-tools { padding: 9px 10px; }
  #company-help-status { order: -1; flex-basis: 100%; }
  #company-help-page { height: 65vh; padding: 16px; }
}
