/* Sign / background shared styles: form canvas preview and signature pad. */
canvas,
img {
  max-width: 100%;
  height: auto;
}

/* Unificado con vectorizar/pdf-unir: #sign-pdf-drop usa el mismo estilo que #drop */
.files-panel #sign-pdf-drop {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed rgba(104, 107, 130, 0.35);
  border-radius: 16px;
  background: rgba(148, 151, 169, 0.04);
  transition: 0.2s;
  padding: 24px;
  text-align: center;
  gap: 0;
  cursor: pointer;
}
.files-panel #sign-pdf-drop:hover {
  border-color: #7132f5;
}
.files-panel #sign-pdf-drop h3 {
  font-size: 28px;
  line-height: 1.29;
  letter-spacing: -0.5px;
  font-weight: 700;
  margin: 20px 0 0;
  font-family: var(--display);
}
.files-panel #sign-pdf-drop p {
  font-size: 16px;
  margin-bottom: 24px;
  color: var(--muted);
}
.files-panel #sign-pdf-drop small {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 20px;
  line-height: 1.5;
}
.ui-shell .files-panel #sign-pdf-drop {
  min-height: 290px;
  background: rgba(148, 151, 169, 0.04);
  border: 1.5px dashed rgba(104, 107, 130, 0.3);
}
.ui-shell .files-panel #sign-pdf-drop h3 {
  font-size: 24px;
  letter-spacing: -0.5px;
  margin-top: 16px;
}
.ui-shell .files-panel #sign-pdf-drop p {
  font-size: 14px;
}
#sign-choose,
.ui-shell #sign-choose {
  background: #7132f5;
  color: #fff;
  border-color: #5741d8;
}
#sign-choose:hover,
.ui-shell #sign-choose:hover {
  background: #5b1ecf;
  color: #fff;
  border-color: #5741d8;
}
input,
select {
  padding: 10px;
}
#pad {
  border: 1px solid #dedee5;
  touch-action: none;
}
#sign-draw {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
#file-row .file-controls {
  display: flex;
  gap: 5px;
}
#file-row .file-controls button {
  padding: 5px 8px;
}
#sign-text input {
  display: block;
  width: 100%;
  margin-top: 10px;
  font-size: 14px;
  padding: 11px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}
#sign-image input {
  display: block;
  margin-top: 10px;
  max-width: 100%;
}
#sign-draw #clear {
  flex-shrink: 0;
}
label {
  display: block;
  margin: 16px 0;
}

/* Section: signature preview */
#sign-preview-block {
  margin-top: 24px;
}
#sign-preview-block h2 {
  font-size: 18px;
  margin: 8px 0;
}
#preview-hint,
.preview-limit {
  font-size: 14px;
}
#preview-wrap {
  overflow: auto;
  border: 1px solid #dedee5;
  border-radius: 8px;
  background: #f7f7fb;
  max-width: 100%;
}
#preview-stage {
  position: relative;
  width: fit-content;
}
#preview-stage #preview {
  display: block;
  max-width: none;
}
#sign-box {
  position: absolute;
  border: 2px dashed #7132f5;
  background-color: rgba(113, 50, 245, 0.12);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 2px;
  cursor: move;
  touch-action: none;
}
#sign-box:focus-visible {
  outline: 3px solid #5b1ecf;
  outline-offset: 2px;
}
#sign-grip {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #7132f5;
  cursor: nwse-resize;
}
