/* Progressive enhancements: critical visual styling is also embedded inline in the field markup. */
.cmn-gfs-pad {
  width: 100%;
  max-width: 680px;
  box-sizing: border-box;
}
.cmn-gfs-pad .cmn-gfs-canvas-wrap {
  position: relative;
  width: 100%;
  padding: 0;
  border: 2px solid #9aa5b5;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
}
.cmn-gfs-pad .cmn-gfs-guideline {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 30px;
  border-top: 1px solid #e3e7ec;
  pointer-events: none;
}
.cmn-gfs-pad canvas.cmn-gfs-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 190px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.cmn-gfs-pad:focus-within .cmn-gfs-canvas-wrap {
  border-color: #485a8d;
}
.cmn-gfs-pad .cmn-gfs-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.cmn-gfs-pad .cmn-gfs-instructions {
  color: #626876;
  font-size: 13px;
  line-height: 1.5;
}
/* Keep button semantics but style like a quiet, underlined text link.
   Targeted !important rules neutralize themes that restyle every button. */
.cmn-gfs-pad button.cmn-gfs-clear {
  display: inline-block !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 0 0 auto;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: #344a74 !important;
  cursor: pointer;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  text-transform: none !important;
  letter-spacing: normal !important;
  transition: none !important;
}
.cmn-gfs-pad button.cmn-gfs-clear:hover {
  color: #1e3159 !important;
  background: transparent !important;
}
.cmn-gfs-pad button.cmn-gfs-clear:focus-visible {
  outline: 2px solid #485a8d !important;
  outline-offset: 3px;
}
.cmn-gfs-editor-preview {
  min-height: 110px;
  border: 2px dashed #9aa5b5;
  border-radius: 8px;
  color: #737b87;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafb;
}
@media (max-width: 600px) {
  .cmn-gfs-pad .cmn-gfs-toolbar { align-items: flex-start; }
}
