.receipt-generator-holder {
  padding: 18px 0 28px;
  background:
    radial-gradient(circle at top left, rgba(23, 120, 181, 0.08), transparent 30rem),
    #f6f8fb;
}

.receipt-generator-holder > .container {
  max-width: 1180px;
}

.holder .receipt-generator-holder .receipt-generator-contents .breadcrumb-nav {
  margin-bottom: 10px;
}

.holder .receipt-generator-holder .receipt-generator-contents .breadcrumb {
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.2;
}

.holder .receipt-generator-holder .receipt-generator-contents .breadcrumb-item + .breadcrumb-item::before {
  padding: 0 6px;
  color: #b8c1cf;
}

.holder .receipt-generator-holder .receipt-generator-contents .breadcrumb-item a {
  color: #1f7bb0;
  font-weight: 600;
}

.holder .receipt-generator-holder .receipt-generator-contents .breadcrumb-item.active span {
  color: #7b8698;
  font-weight: 500;
}

.generator-page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 48px;
  max-width: none;
}

.generator-page-titleline {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.generator-pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px 3px 5px;
  border: 1px solid #f6c84c;
  border-radius: 999px;
  background: linear-gradient(145deg, #fff9d8, #fbbf24);
  box-shadow: 0 4px 12px rgba(180, 107, 0, .18);
  color: #854d0e;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.generator-pro-badge svg {
  width: 14px;
  height: 14px;
  fill: #f59e0b;
  stroke: #92400e;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.holder .receipt-generator-holder .receipt-generator-contents h1 {
  margin: 0;
  color: #172033;
  font-size: clamp(28px, 2.5vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-align: left;
}

.generator-page-instructions {
  flex: 0 1 26rem;
  max-width: 26rem;
  margin: 0;
  color: #66717f;
  font-size: 15px;
  line-height: 1.45;
  text-align: right;
}

.generator-page-note {
  margin: 8px 0 0;
  color: #66717f;
  font-size: 13px;
  line-height: 1.45;
}

.receipt-generator-holder .receipt-generator-wrap {
  margin-top: 12px;
  padding: 20px;
  border: 1px solid #dfe5ee;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(23, 32, 51, 0.08);
}

.receipt-generator-holder .receipt-generator-wrap > .row {
  align-items: flex-start;
  margin-inline: -10px;
}

.receipt-generator-holder .receipt-generator-wrap > .row > [class*="col-"] {
  padding-inline: 10px;
}

.receipt-generator-holder .receipt-generator-form {
  width: 100% !important;
  max-width: 520px;
  margin: 0 !important;
}

.receipt-generator-holder .common-wrap h5 {
  margin-bottom: 12px;
  color: #172033;
  font-size: 17px;
  line-height: 1.3;
}

.generator-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.generator-form .form-control {
  width: 100%;
  height: 36px !important;
  margin-bottom: 0 !important;
  padding: 6px 10px !important;
  color: #263247 !important;
  font-size: 13px !important;
  line-height: 22px;
  background-color: #fff !important;
  border: 1px solid #d8dfeb !important;
  border-radius: 9px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.generator-form .form-control:focus {
  border-color: #1778b5 !important;
  box-shadow: 0 0 0 3px rgba(23, 120, 181, 0.13) !important;
}

.generator-form select.form-control {
  padding-right: 30px !important;
  background-position: calc(100% - 10px) center !important;
}

.generator-form .time_pick,
.generator-form .form-inline {
  width: 100%;
  margin: 0;
}

/* The popup must stay wide enough for hour, minute, and AM/PM.
   Width 100% squeezed it into the Time column and wrapped the third column. */
.generator-form .timepicker_wrap {
  box-sizing: border-box;
  width: 280px;
  max-width: calc(100vw - 24px);
  margin: 0;
  padding: 12px 8px 8px;
  z-index: 40;
  left: auto !important;
  right: 0 !important;
}

.generator-form .timepicker_wrap .arrow_top {
  left: auto;
  right: 36px;
}

.generator-form .timepicker_wrap::after {
  content: "";
  display: block;
  clear: both;
}

.generator-form .timepicker_wrap .time,
.generator-form .timepicker_wrap .mins,
.generator-form .timepicker_wrap .meridian {
  box-sizing: border-box;
  width: 80px;
  margin: 0 2px;
}

.generator-form .timepicker_wrap input.timepicki-input {
  width: 100%;
  height: 34px;
  box-sizing: border-box;
  font-size: 18px;
}

.generator-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.generator-preferences-row {
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr);
  align-items: center;
  padding: 7px;
  background: #f6f8fb;
  border: 1px solid #e4e9f1;
  border-radius: 11px;
}

.generator-preferences-row .form-inline {
  min-height: 34px;
  padding: 0 6px;
}

.generator-preferences-row label {
  display: flex;
  align-items: center;
  margin: 0;
  color: #4d596e;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}

.generator-preferences-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 7px 0 0 !important;
  accent-color: #1778b5;
}

.generator-form .tax-group {
  display: block;
}

.generator-form .tax-group > .row {
  display: grid;
  grid-template-columns: 0.6fr 1.3fr 1fr 0.8fr 30px;
  gap: 7px;
  align-items: center;
  margin: 0;
}

.generator-form .tax-group > .row > [class*="col-"] {
  width: auto;
  max-width: none;
  padding: 0;
  flex: none;
}

.generator-form .tax-group #tax-form-2 {
  display: grid;
  grid-template-columns: 0.65fr 1.3fr 1fr 30px;
  grid-column: 1 / -1;
  gap: 7px;
  align-items: center;
  width: 100%;
  margin: 7px 0 0;
}

.generator-form .tax-group #tax-form-2 > [class*="col-"] {
  width: auto;
  max-width: none;
  padding: 0;
  flex: none;
}

.generator-form .tax-group #tax-form-2 .col-offset-3 {
  margin-left: 0;
}

.generator-form .tax-group .increment {
  display: grid;
  width: 30px;
  height: 30px;
  margin: 0;
  place-items: center;
  border-radius: 9px;
  background: #e8f4fb;
}

.generator-form .make-receipt-butn {
  margin-top: 2px;
}

.generator-form .make-receipt-btn-custom {
  min-height: 42px;
  padding: 9px 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #1778b5, #2496cf);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 7px 18px rgba(23, 120, 181, 0.22);
}

.generator-form .make-receipt-btn-custom:hover {
  background: linear-gradient(135deg, #105f91, #1778b5);
  transform: translateY(-1px);
}

.receipt-preview-box {
  min-height: 0;
}

.holder .receipt-generator-holder .receipt-preview-box {
  margin: 0;
  padding: 14px;
  background-color: #f8fafc;
  border-radius: 12px;
}

.holder .receipt-generator-holder .receipt-preview-box:hover {
  background-color: #f8fafc;
  box-shadow: 0 0 2px 2px #e4e9f0;
}

.receipt-preview-box .preview-upsell-btn {
  display: inline-block;
  margin: 0 0 10px !important;
  padding: 4px 13px !important;
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 1.5;
}

.receipt-preview-box .preview-upsell-below {
  margin-top: 12px;
}

.receipt-preview-box .preview-upsell-below .preview-upsell-btn {
  margin: 0 !important;
}

.receipt-preview-box .list-inline {
  margin: 0;
  padding: 0;
}

.receipt-preview-box .list-inline > li {
  padding: 0;
}

.receipt-preview-box .newreceipt29-form {
  margin-top: 14px;
}

.receipt-preview-img {
  display: grid;
  min-height: 420px;
  max-height: 570px;
  padding: 12px;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(45deg, #eef1f6 25%, transparent 25%),
    linear-gradient(-45deg, #eef1f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef1f6 75%),
    linear-gradient(-45deg, transparent 75%, #eef1f6 75%),
    #f8fafc;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
}

.receipt-preview-img img {
  width: auto !important;
  max-width: 100%;
  max-height: 540px;
  object-fit: contain;
  box-shadow: 0 8px 26px rgba(23, 32, 51, 0.16);
}

/* The generators output 819x1361, so the preview can fill the column and stay
   downscaled (sharp). The viewport cap keeps it from running off short screens. */
.receipt-preview-box img[title="Generated Receipt"] {
  width: auto !important;
  max-width: 100%;
  max-height: min(84vh, 860px);
  object-fit: contain;
  box-shadow: 0 8px 26px rgba(23, 32, 51, 0.16);
}

.receipt-preview-box .receipt-zoom-trigger {
  cursor: zoom-in;
}

.receipt-zoom-hint {
  display: block;
  margin: 8px 0 0;
  color: #657085;
  font-size: 11px;
}

.receipt-zoom-overlay {
  position: fixed;
  /* Legacy style.css stacks the header and footer as high as 99999999999. */
  z-index: 2147483000;
  inset: 0;
  display: flex;
  overflow: auto;
  padding: 24px;
  align-items: flex-start;
  justify-content: center;
  background: rgba(15, 22, 36, 0.88);
  overscroll-behavior: contain;
}

.receipt-zoom-overlay[hidden] {
  display: none;
}

.receipt-zoom-overlay img {
  width: auto;
  max-width: none;
  height: auto;
  margin: 0 auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.receipt-zoom-close {
  position: fixed;
  z-index: 1;
  top: 16px;
  right: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  color: #1a2233;
  place-items: center;
  background: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

body.receipt-zoom-open {
  overflow: hidden;
}

.receipt-preview-details h5 {
  margin: 8px 0 0 !important;
  font-size: 13px !important;
}

.receipt-ready-bar {
  position: fixed;
  z-index: 1000;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 10px 10px 14px;
  color: #fff;
  background: #172033;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 22, 36, 0.28);
}

.receipt-ready-bar p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.receipt-ready-bar button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  color: #105f91;
  background: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.receipt-preview-box.is-highlighted {
  box-shadow: 0 0 0 3px rgba(23, 120, 181, 0.45);
}

.logo-upload {
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
}

.logo-dropzone {
  display: flex;
  min-height: 76px;
  padding: 12px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #4d596e;
  text-align: left;
  background: #fff;
  border: 1.5px dashed #aab6c8;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.logo-dropzone:hover,
.logo-dropzone.is-dragging {
  background: #eef7fc;
  border-color: #1778b5;
}

.logo-dropzone-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  color: #1778b5;
  place-items: center;
  background: #e8f4fb;
  border-radius: 10px;
  font-size: 18px;
}

.logo-dropzone-copy strong,
.logo-dropzone-copy small {
  display: block;
}

.logo-dropzone-copy strong {
  color: #263247;
  font-size: 13px;
}

.logo-dropzone-copy small {
  margin-top: 2px;
  font-size: 11px;
}

.logo-crop-workspace[hidden] {
  display: none !important;
}

.logo-crop-workspace {
  margin-top: 10px;
}

.logo-crop-canvas {
  height: 150px;
  overflow: hidden;
  background: #edf1f6;
  border-radius: 10px;
}

.logo-crop-canvas img {
  display: block;
  max-width: 100%;
}

.logo-crop-toolbar {
  display: flex;
  margin-top: 8px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.logo-crop-toolbar-group {
  display: flex;
  gap: 6px;
}

.logo-crop-toolbar button {
  display: inline-grid;
  min-width: 34px;
  height: 32px;
  padding: 0 9px;
  color: #344056;
  place-items: center;
  background: #fff;
  border: 1px solid #d8dfeb;
  border-radius: 9px;
  cursor: pointer;
}

.logo-crop-toolbar button:hover {
  color: #1778b5;
  border-color: #1778b5;
}

.logo-upload-status {
  margin: 7px 0 0;
  color: #657085;
  font-size: 11px;
}

.logo-upload-status.is-error {
  color: #b42318;
}

@media (max-height: 820px) and (min-width: 768px) {
  .receipt-generator-holder {
    padding-top: 10px;
  }

  .receipt-generator-holder .receipt-generator-wrap {
    margin-top: 9px;
    padding: 14px;
  }

  .receipt-preview-img {
    min-height: 360px;
    max-height: 490px;
  }

  .receipt-preview-img img {
    max-height: 460px;
  }
}

@media (max-width: 767.98px) {
  .receipt-generator-holder {
    padding-top: 12px;
  }

  .holder .receipt-generator-holder .receipt-generator-contents h1,
  .generator-page-instructions {
    text-align: left;
  }

  .generator-page-intro {
    display: block;
  }

  .generator-page-instructions {
    max-width: none;
    margin-top: 6px;
    font-size: 14px;
    text-align: left;
  }

  .holder .receipt-generator-holder .receipt-generator-contents .breadcrumb {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .holder .receipt-generator-holder .receipt-generator-contents h1 {
    margin-bottom: 0;
    font-size: 26px;
  }

  .receipt-generator-holder .receipt-generator-contents .h1-mobile-break {
    display: none;
  }

  .receipt-generator-holder .receipt-generator-wrap {
    padding: 13px;
    border-radius: 13px;
  }

  .generator-preferences-row {
    grid-template-columns: 1fr;
  }

  .receipt-preview-box {
    margin-top: 18px;
  }

  .receipt-preview-img {
    min-height: 320px;
  }

  .receipt-preview-box {
    scroll-margin-top: 12px;
  }

  .receipt-ready-bar.is-visible {
    display: flex;
  }

  /* 16px stops mobile browsers from zooming the page when a field is focused. */
  .generator-form .form-control,
  .generator-form input.timepicki-input {
    font-size: 16px !important;
  }

  .generator-form .form-control {
    height: 44px !important;
  }
}

@media (max-width: 420px) {
  .generator-form .tax-group > .row {
    grid-template-columns: 0.65fr 1.35fr 1fr 0.85fr 28px;
    gap: 4px;
  }

  .generator-form .tax-group #tax-form-2 {
    grid-template-columns: 0.65fr 1.35fr 1fr 28px;
    gap: 4px;
  }

  .generator-form .tax-group .form-control {
    padding-inline: 5px !important;
    font-size: 16px !important;
  }
}

/* Partner badges sit in the card corner, same artwork as search results. */
.holder .receipt-holder .receipt-img .free-tag {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  width: 52px;
  height: 52px;
  margin: 0;
  pointer-events: none;
}

.holder .receipt-holder .receipt-img .free-tag img {
  position: static;
  display: block;
  width: 52px;
  height: 52px;
  max-width: 52px;
  min-height: 0;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(23, 32, 51, 0.28));
}

@media (max-width: 767.98px) {
  .holder .receipt-holder .receipt-img .free-tag,
  .holder .receipt-holder .receipt-img .free-tag img {
    width: 40px;
    height: 40px;
    max-width: 40px;
  }
}

.template-guide-summary {
  margin: 4px 0 16px;
}

.template-guide-summary p {
  max-width: 42rem;
  margin: 0;
  color: #4b5568;
  font-size: 15px;
  line-height: 1.45;
}

.template-guide {
  max-width: 760px;
  margin: 12px auto 40px;
  padding: 4px 20px 8px;
  color: #3d4a5c;
}

.template-guide h2 {
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e4ebf3;
  color: #172033;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
}

.template-guide h2:first-child {
  margin-top: 8px;
}

.template-guide h3 {
  margin: 16px 0 4px;
  color: #172033;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.template-guide p,
.template-guide li {
  font-size: 15px;
  line-height: 1.65;
}

.template-guide p {
  margin: 0 0 4px;
}

.template-guide ol,
.template-guide ul {
  margin: 0 0 4px;
  padding-left: 1.25rem;
}

.template-guide ol li,
.template-guide ul li {
  margin: 0 0 8px;
}

.template-guide .template-guide-fields {
  margin: 0;
  padding: 0;
  list-style: none;
}

.template-guide .template-guide-fields li {
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid #eef2f6;
  line-height: 1.6;
}

.template-guide-fields li:last-child {
  border-bottom: 0;
}

.template-guide-fields strong {
  margin-right: 6px;
  color: #172033;
  font-weight: 700;
}

.template-guide-fields strong::after {
  content: "—";
  margin-left: 6px;
  color: #8b97a8;
  font-weight: 500;
}

.template-guide a {
  font-weight: 700;
}
