@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat/static/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat/static/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope/static/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope/static/Manrope-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Sans Narrow";
  src: url("/assets/fonts/PTSansNarrow/static/PTSansNarrow-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Sans Narrow";
  src: url("/assets/fonts/PTSansNarrow/static/PTSansNarrow-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comfortaa";
  src: url("/assets/fonts/Comfortaa/static/Comfortaa-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/CormorantGaramond/static/CormorantGaramond-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lobster";
  src: url("/assets/fonts/Lobster/static/Lobster-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

.jp-badge-tool {
  margin: -8px 0 0;
}

.jp-page--toolkit-badge-insert > .jp-container {
  width: min(1500px, calc(100% - 24px));
}

.jp-page--toolkit-badge-insert .jp-content-box {
  padding: 20px;
}

.jp-badge-tool__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.jp-badge-tool__intro h2 {
  margin: 0;
  max-width: 760px;
  color: #111827;
  font-size: 32px;
  line-height: 1.12;
}

.jp-badge-tool__intro p {
  margin: 12px 0 0;
  max-width: 800px;
  color: #667085;
  font-size: 16px;
  line-height: 1.55;
}

.jp-badge-tool__product-cta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  font-size: 15px;
  line-height: 1.4;
}

.jp-badge-tool__product-cta span {
  font-weight: 700;
}

.jp-badge-tool__product-cta a {
  color: #15803d;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.jp-badge-tool__product-cta a:hover,
.jp-badge-tool__product-cta a:focus-visible {
  color: #14532d;
}

.jp-badge-tool__help-button {
  justify-self: end;
  min-height: 42px;
  border-color: rgba(255, 103, 0, 0.28);
  background: #fff7f0;
  color: #9a3412;
  box-shadow: 0 8px 18px rgba(255, 103, 0, 0.12);
  white-space: nowrap;
}

.jp-badge-tool__help-button:hover,
.jp-badge-tool__help-button:focus-visible {
  border-color: rgba(255, 103, 0, 0.44);
  background: #ffefe2;
  color: #7c2d12;
}

body.jp-badge-help-modal-open {
  overflow: hidden;
}

.jp-badge-help-modal[hidden] {
  display: none;
}

.jp-badge-help-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.jp-badge-help-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
}

.jp-badge-help-modal__dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.jp-badge-help-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.jp-badge-help-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 22px;
  max-height: inherit;
  overflow: auto;
  padding: 28px;
}

.jp-badge-help-modal__intro {
  grid-column: 1 / -1;
  max-width: 760px;
  padding-right: 48px;
}

.jp-badge-help-modal__intro h3 {
  margin: 0;
  color: #111827;
  font-family: var(--jp-font-heading);
  font-size: 26px;
  line-height: 1.15;
}

.jp-badge-help-modal__intro p {
  margin: 10px 0 0;
  color: #667085;
  font-size: 15px;
  line-height: 1.55;
}

.jp-badge-help-modal__figure {
  align-self: start;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--jp-border);
  border-radius: 8px;
  background: #f8fafc;
}

.jp-badge-help-modal__figure img {
  display: block;
  width: 100%;
  height: auto;
}

.jp-badge-help-modal__steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: badge-help;
}

.jp-badge-help-modal__steps li {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 44px;
  padding-left: 44px;
  color: #475467;
  font-size: 14px;
  line-height: 1.45;
  counter-increment: badge-help;
}

.jp-badge-help-modal__steps li::before {
  content: counter(badge-help);
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff7f0;
  color: var(--jp-orange);
  font-weight: 800;
}

.jp-badge-help-modal__steps strong {
  color: #111827;
  font-size: 15px;
}

.jp-badge-help-modal__steps span {
  color: #667085;
}

.jp-badge-tool__workspace {
  display: grid;
  grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.jp-badge-tool__panel,
.jp-badge-tool__preview {
  border: 1px solid var(--jp-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
}

.jp-badge-tool__panel {
  position: sticky;
  top: calc(var(--jp-header-sticky-offset, 130px) + 16px);
  display: grid;
  gap: 16px;
  padding: 16px;
}

.jp-badge-tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jp-badge-tool__actions .jp-btn {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
}

.jp-badge-tool__group {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #fbfcfe;
}

.jp-badge-tool__group legend {
  display: flex;
  position: relative;
  gap: 8px;
  align-items: center;
  padding: 0 6px;
  color: #111827;
  font-family: var(--jp-font-heading);
  font-size: 14px;
  font-weight: 800;
}

.jp-badge-tool__field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.jp-badge-tool__field small {
  color: #667085;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.jp-badge-tool__help-tip {
  position: relative;
  display: inline-flex;
}

.jp-badge-tool__help-tip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 103, 0, 0.28);
  border-radius: 999px;
  background: #fff7f0;
  color: var(--jp-orange);
  font: 800 13px/1 var(--jp-font-heading);
  cursor: pointer;
}

.jp-badge-tool__help-tip-button:hover,
.jp-badge-tool__help-tip-button:focus-visible,
.jp-badge-tool__help-tip.is-open .jp-badge-tool__help-tip-button {
  border-color: rgba(255, 103, 0, 0.48);
  background: #ffefe2;
  color: #9a3412;
}

.jp-badge-tool__help-tip-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(380px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 103, 0, 0.2);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.16);
  color: #475467;
  font-family: var(--jp-font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.jp-badge-tool__help-tip:hover .jp-badge-tool__help-tip-popover,
.jp-badge-tool__help-tip:focus-within .jp-badge-tool__help-tip-popover,
.jp-badge-tool__help-tip.is-open .jp-badge-tool__help-tip-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.jp-badge-tool__textarea {
  min-height: 110px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
}

.jp-badge-tool__table {
  overflow: hidden;
  border: 1px solid var(--jp-border);
  border-radius: 8px;
  background: #fff;
}

.jp-badge-tool__table-head,
.jp-badge-tool__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) 36px;
  align-items: stretch;
}

.jp-badge-tool__table-head {
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.jp-badge-tool__table-head span,
.jp-badge-tool__row input {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--jp-border);
  border-radius: 0;
}

.jp-badge-tool__table-head span {
  padding: 9px 10px;
}

.jp-badge-tool__row + .jp-badge-tool__row {
  border-top: 1px solid var(--jp-border);
}

.jp-badge-tool__row input {
  min-height: 38px;
  padding: 8px 10px;
  background: #fff;
  color: #101828;
  font: 13px/1.35 inherit;
}

.jp-badge-tool__row input:focus {
  position: relative;
  z-index: 1;
  outline: 1.5px solid var(--jp-orange);
  outline-offset: -1.5px;
}

.jp-badge-tool__row-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 38px;
  border: 0;
  background: #fff;
  color: #98a2b3;
  cursor: pointer;
}

.jp-badge-tool__row-remove:hover {
  color: #b42318;
  background: #fff5f5;
}

.jp-badge-tool__table-actions,
.jp-badge-tool__paste-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.jp-badge-tool__paste {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 103, 0, 0.16);
  border-radius: 8px;
  background: #fff7f0;
}

.jp-badge-tool__paste[hidden] {
  display: none;
}

.jp-badge-tool__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.jp-badge-tool__checks {
  display: grid;
  gap: 8px;
  color: #475467;
  font-size: 13px;
}

.jp-badge-tool__checks label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.jp-badge-tool__checks input {
  width: 16px;
  height: 16px;
  accent-color: var(--jp-orange);
}

.jp-badge-tool__note {
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.jp-badge-tool__preview {
  min-width: 0;
  overflow: hidden;
}

.jp-badge-tool__preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--jp-border);
  color: #111827;
}

.jp-badge-tool__preview-head span {
  color: #667085;
  font-size: 13px;
}

.jp-badge-tool__pages {
  display: grid;
  gap: 18px;
  overflow: auto;
  min-height: 520px;
  max-height: min(760px, calc(100vh - 210px));
  padding: 18px;
  background: #eef2f6;
}

.jp-badge-tool__empty {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #667085;
  text-align: center;
}

.jp-badge-sheet {
  --page-width: 210mm;
  --page-height: 297mm;
  --page-margin: 10mm;
  --card-width: 64mm;
  --card-height: 15mm;
  --window-width: 62mm;
  --window-height: 13mm;
  --window-offset: 1mm;
  --card-padding: 1mm;
  position: relative;
  width: var(--page-width);
  min-width: var(--page-width);
  height: var(--page-height);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.16);
}

.jp-badge-sheet__grid {
  position: absolute;
  top: var(--page-margin);
  left: var(--page-margin);
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--card-width));
  grid-auto-rows: var(--card-height);
}

.jp-badge-insert {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--card-width);
  height: var(--card-height);
  overflow: hidden;
  background: #fff;
  color: #101828;
  text-align: center;
}

.jp-badge-sheet.has-cut-lines .jp-badge-insert {
  border: 0.2mm dashed #98a2b3;
}

.jp-badge-print-host {
  display: none;
}

.jp-badge-insert__content {
  position: absolute;
  top: var(--window-offset);
  left: var(--window-offset);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: var(--window-width);
  height: var(--window-height);
  padding: var(--card-padding);
  line-height: 0.96;
}

.jp-badge-insert__name,
.jp-badge-insert__sub {
  max-width: 100%;
  min-height: 1em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.jp-badge-insert__name {
  font-weight: 700;
}

.jp-badge-insert__sub {
  margin-top: 0.16em;
  opacity: 0.86;
}

.jp-badge-insert__content.is-uppercase {
  text-transform: uppercase;
}

.jp-badge-insert__editable:focus {
  outline: 1.5px solid var(--jp-orange);
  outline-offset: 1px;
  border-radius: 4px;
  background: #fff7f0;
}

@media (max-width: 1100px) {
  .jp-badge-tool__workspace {
    grid-template-columns: 1fr;
  }

  .jp-badge-tool__panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .jp-badge-tool__intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .jp-badge-tool__intro h2 {
    font-size: 26px;
  }

  .jp-badge-tool__help-button {
    justify-self: start;
  }

  .jp-badge-help-modal {
    padding: 12px;
  }

  .jp-badge-help-modal__dialog {
    max-height: calc(100vh - 24px);
    border-radius: 8px;
  }

  .jp-badge-help-modal__body {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 22px 16px 18px;
  }

  .jp-badge-help-modal__intro {
    padding-right: 44px;
  }

  .jp-badge-help-modal__intro h3 {
    font-size: 22px;
  }

  .jp-badge-help-modal__steps li {
    padding-left: 38px;
  }

  .jp-badge-tool__grid {
    grid-template-columns: 1fr;
  }

  .jp-badge-tool__table-head,
  .jp-badge-tool__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  }

  .jp-badge-tool__pages {
    min-height: 420px;
    max-height: 620px;
    padding: 12px;
  }
}

@media print {
  body.jp-badge-tool-printing > :not(.jp-badge-print-host) {
    display: none !important;
  }

  body.jp-badge-tool-printing .jp-badge-print-host {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
  }

  html.jp-badge-tool-printing .jp-breadcrumbs,
  body.jp-badge-tool-printing .jp-header,
  body.jp-badge-tool-printing .jp-footer,
  body.jp-badge-tool-printing .jp-breadcrumbs,
  body.jp-badge-tool-printing .jp-page__head,
  body.jp-badge-tool-printing .jp-badge-tool__intro,
  body.jp-badge-tool-printing .jp-badge-tool__panel,
  body.jp-badge-tool-printing .jp-badge-tool__preview-head,
  body.jp-badge-tool-printing .jp-cookie-banner {
    display: none !important;
  }

  body:has(.jp-badge-tool) .jp-breadcrumbs {
    display: none !important;
  }

  body.jp-badge-tool-printing .jp-badge-print-host .jp-badge-tool__pages,
  body.jp-badge-tool-printing .jp-main,
  body.jp-badge-tool-printing .jp-page,
  body.jp-badge-tool-printing .jp-container,
  body.jp-badge-tool-printing .jp-content-box,
  body.jp-badge-tool-printing .jp-page__content,
  body.jp-badge-tool-printing .jp-badge-tool,
  body.jp-badge-tool-printing .jp-badge-tool__workspace,
  body.jp-badge-tool-printing .jp-badge-tool__preview,
  body.jp-badge-tool-printing .jp-badge-tool__pages {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    overflow: visible !important;
  }

  .jp-badge-sheet {
    margin: 0 !important;
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
  }

  .jp-badge-sheet:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  body.jp-badge-tool-printing > :not(.jp-badge-print-host) {
    display: none !important;
  }

  body.jp-badge-tool-printing .jp-badge-print-host,
  body.jp-badge-tool-printing .jp-badge-print-host .jp-badge-tool__pages {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    overflow: visible !important;
  }
}
