/* IMPORTANT (folder_print.css): Farveikoner skal matche PrintPriser. Kunden ser kun salgspris. */
/* IMPORTANT (folder_print.css): PDF står først. Ingen hjørne-/sidehæftning. 80 g er startvalg. */
/* IMPORTANT (folder_print.css): Folder er A5/A4, fast 4 sider. Samme som et hæfte på 4 sider. */
.fd-same-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  background: rgba(250, 204, 21, 0.08);
  color: #fde68a;
  font-weight: 700;
}

#fdPagesHint {
  margin: 10px 0 0;
}

/* IMPORTANT (folder_print.css): 4-siders-knappen får lille «Samme som folder» uden at ændre kortstørrelse. */
#fdPagesRow .fl-tile-option {
  min-height: 58px;
  height: 58px;
  overflow: hidden;
  gap: 0;
}

#fdPagesRow .fl-tile-title {
  line-height: 1.1;
}

.fd-tile-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1;
  color: rgba(226, 232, 240, 0.72);
  white-space: nowrap;
}

#fdPagesRow .fl-tile-option:has(input:checked) .fd-tile-sub {
  color: rgba(255, 235, 167, 0.88);
}

/* IMPORTANT (folder_print.css): Højst 4 PDF'er og 4 sider. Upload-knapper slås fra, når listen er fuld. */
.fd-upload-actions .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* IMPORTANT (folder_print.css): 5 mm margen hele vejen rundt. Udskrives ikke. */
.fd-margin-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 235, 167, 0.35);
  background: rgba(255, 235, 167, 0.08);
  color: #ffeba7;
  font-weight: 700;
}

.fd-margin-note--preview {
  margin: 10px 16px 0;
}

.fd-file-row.is-blank {
  border-style: dashed;
  background: rgba(15, 23, 42, 0.28);
}

.fd-file-row.is-blank .fd-file-num {
  background: rgba(226, 232, 240, 0.78);
}

.fd-file-row.is-blank .fd-file-name {
  color: rgba(226, 232, 240, 0.88);
  font-style: italic;
}

.fd-shell {
  max-width: 1100px;
}

.fd-color-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.fd-color-icon {
  width: 84px;
  height: 66px;
  display: block;
}

.fd-qty-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 220px;
}

.fd-qty-wrap input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  font: inherit;
  font-weight: 700;
}

.fd-qty-wrap span {
  font-weight: 700;
}

.fd-price-panel .button {
  width: 100%;
  margin-top: 12px;
}

.fd-tier-box {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 2px 0 0;
}

.fd-tier-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-align: center;
}

.fd-tier-col span {
  font-weight: 800;
  color: #ffeba7;
}

.fd-tier-col strong {
  font-weight: 800;
}

.fd-tier-col.is-active {
  border-color: #86efac;
  background: rgba(134, 239, 172, 0.1);
  box-shadow: 0 0 0 1px rgba(134, 239, 172, 0.35), 0 0 12px rgba(134, 239, 172, 0.22);
}

.fd-tier-col.is-active span,
.fd-tier-col.is-active strong {
  color: #86efac;
}

.fd-tier-vat {
  margin: 8px 0 0;
  text-align: center;
}

.fd-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fd-file-list-wrap {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.35);
}

.fd-file-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fd-file-list-head strong {
  color: #ffeba7;
}

.fd-sort-name-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
}

.fd-file-list-help {
  margin: 8px 0 0;
}

.fd-file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fd-file-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
}

.fd-file-row.is-dragging {
  opacity: 0.55;
}

.fd-file-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0b1220;
  background: #ffeba7;
}

.fd-file-meta {
  min-width: 0;
}

.fd-file-name {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fd-file-pages {
  margin-top: 2px;
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.92rem;
}

.fd-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fd-file-actions .button {
  min-height: 36px;
  padding: 6px 10px;
}

@media (max-width: 720px) {
  .fd-file-row {
    grid-template-columns: auto 1fr;
  }

  .fd-file-actions {
    grid-column: 1 / -1;
  }
}

.fd-preview-dialog {
  width: min(1100px, calc(100vw - 24px));
  overflow: visible;
}

.fd-preview-help {
  margin: 0;
  padding: 10px 16px 0;
}

/* IMPORTANT (folder_print.css): Preview er et hæfte uden bord/baggrund. Pile under bogen. */
.fd-preview-body {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px 12px;
  background: #111;
  overflow: visible;
}

.fd-book {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform-style: preserve-3d;
  perspective: 1800px;
}

.fd-book-page {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.fd-book-page--left {
  border-radius: 3px 0 0 3px;
}

.fd-book-page--right {
  border-radius: 0 3px 3px 0;
}

.fd-book-page.is-void {
  visibility: hidden;
  box-shadow: none;
  background: transparent;
}

.fd-book-page canvas,
.fd-book-leaf-face canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.fd-book-spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 10px;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.3));
}

.fd-book-leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  transform: rotateY(0deg);
  transform-origin: left center;
  transform-style: preserve-3d;
  z-index: 6;
  transition: transform 0.55s ease;
}

.fd-book-leaf[hidden] {
  display: none !important;
}

.fd-book-leaf.is-flipped {
  transform: rotateY(-180deg);
}

.fd-book-leaf.is-snap {
  transition: none;
}

.fd-book-leaf-face {
  position: absolute;
  inset: 0;
  background: #fff;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.fd-book-leaf-face--back {
  transform: rotateY(180deg);
}

.fd-book.is-bw canvas {
  filter: grayscale(1);
}

@media (prefers-reduced-motion: reduce) {
  .fd-book-leaf {
    transition: none;
  }
}

.fd-preview-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 16px;
}

.fd-preview-nav .button {
  min-height: 44px;
  min-width: 44px;
}

#fdPreviewPage {
  min-width: 12rem;
  text-align: center;
  font-weight: 800;
  color: #ffeba7;
}

#fdUploadStatus.is-error {
  color: #fca5a5;
}

#fdCartStatus.is-error {
  color: #fca5a5;
}

.fl-paper-grid .fl-paper-option,
.fl-paper-grid .fl-tile-option {
  min-height: 88px;
  height: 100%;
}
