.pdfb-form {
  font-family: 'Outfit', sans-serif;
}

.pdfb-field {
  display: block;
  margin-bottom: 16px;
}

.pdfb-field span {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
}

.pdfb-field:has(input:required) span::after {
  content: " *";
  color: #C0392B;
}

.pdfb-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  background: #F0F7F9;
  border-radius: 8px;
  padding-inline: 14px;
  font-size: 14px;
  color: #1a1a1a;
  outline: none;
}

.pdfb-field input:focus {
  border-color: #4A3F92;
  background: #fff;
}

.pdfb-row {
  display: flex;
  gap: 16px;
}
.pdfb-row .pdfb-field {
  flex: 1;
}

.pdfb-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; opacity: 0;
}

.pdfb-dropzone {
  position: relative;
  border: 1px solid #636363;
  border-radius: 5px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  padding: 16px;
  cursor: pointer;
}

.pdfb-dropzone:has(.pdfb-dropzone-remove[hidden]) {
  border: 1px dashed #B6B1D8;
  background: #F0F7F9;
}

.pdfb-dropzone.is-dragover {
  border: 1px dashed #4A3F92;
  background: #EAEFFB;
}

.pdfb-dropzone-empty {
  text-align: center;
}

.pdfb-dropzone-label {
  color: #4A3F92;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
}

.pdfb-dropzone-hint {
  color: #8A8A8A;
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.4;
}

.pdfb-dropzone-thumb {
  max-height: 70px;
  max-width: 100%;
}

.pdfb-dropzone-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 13px;
  background: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 34px;
  color: #636363;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 15 15' fill='none'%3E%3Cline x1='1.12117' y1='0.706956' x2='14.1212' y2='13.707' stroke='%23636363' stroke-width='2'/%3E%3Cline x1='1.12117' y1='0.706956' x2='14.1212' y2='13.707' stroke='%23636363' stroke-width='2'/%3E%3Cline y1='-1' x2='18.3848' y2='-1' transform='matrix(-0.707107 0.707107 0.707107 0.707107 14.4141 1.41406)' stroke='%23636363' stroke-width='2'/%3E%3C/svg%3E");
  background-size: cover;
  border: none;
}

.pdfb-error {
  color: #C0392B;
  font-size: 13px;
  margin: -8px 0 16px;
}

.pdfb-download {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: #D9D9D9;
  cursor: not-allowed;
  transition: background 0.15s ease;
}

.pdfb-download:not(:disabled) {
  background: #4A3F92;
  cursor: pointer;
}

.pdfb-download:not(:disabled):hover {
  background: #3d3479;
}

.pdfb-download.is-loading {
  opacity: 0.7;
  cursor: wait;
}

/* Preview document: client-supplied background JPEG + overlaid info box.
 * --doc-scale (set in pdf-builder.js) scales these to match pdf-template.php's pt values. */
.pdfb-doc {
  --doc-scale: 1;
  position: relative;
  line-height: 0; /* kills the inline-img whitespace gap below .pdfb-doc-bg */
  pointer-events: none;
}

.pdfb-doc-bg {
  width: 100%;
  display: block;
}

.pdfb-doc-box {
  position: absolute;
  font-family: 'Outfit', sans-serif;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: calc(var(--doc-scale) * 12px);
  padding: calc(var(--doc-scale) * 7.5px);
}

.pdfb-doc-practiceinfo {
  flex: 1;
}
.pdfb-doc-practiceinfo .line {
  margin-bottom: calc(var(--doc-scale) * 3px);
  font-size: calc(var(--doc-scale) * 10px);
  color: #5B5F61;
}

.pdfb-doc-placeholder-line {
  height: 8px;
  background: #EDEDED;
  border-radius: 2px;
  margin-bottom: 6px;
}

.pdfb-doc-practicelogo {
  flex: 0 0 calc(var(--doc-scale) * 198.75px); /* definite width, not just max-width */
  align-self: stretch; /* fills .pdfb-doc-box's height */
  display: flex;
  justify-content: center;
  align-items: center;
}
.pdfb-doc-practicelogo img {
  max-width: 100%;
  max-height: 100%; /* SVG: capped, not filled -- see pdf-builder.js */
}
/* Raster logos: object-fit:contain fills the slot at the source's aspect ratio. */
.pdfb-doc-practicelogo img.fill {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.pdfb-doc-placeholder-logo {
  width: 100%;
  height: 100%;
  background: #EDEDED;
  border-radius: calc(var(--doc-scale) * 8px);
}

@media (max-width: 820px) {
  .pdfb-doc { max-width: 100%; }
}
