/* Plotteriet Julekort – 3D-visning og bestillingsfelt på produktsiden */
.pj-gallery { --pj-ink: #264653; --pj-muted: #5A6E70; --pj-line: #DCD3C2; --pj-surface: #FFFCF6; --pj-accent: #E76F51; --pj-danger: #B3261E; }
.pj-form { --pj-ink: #264653; --pj-muted: #5A6E70; --pj-line: #DCD3C2; --pj-surface: #FFFCF6; --pj-accent: #E76F51; --pj-danger: #B3261E; }

.pj-gallery [hidden], .pj-form [hidden] { display: none !important; }
@media (min-width: 768px) { .plotteriet-julekort-page div.product .pj-gallery { position: sticky; top: 24px; } }

.pj-viewer {
  position: relative; width: 100%; max-width: 100%; aspect-ratio: 1 / 1; background: #B4C5D6;
  border-radius: 6px; overflow: hidden; outline: none; cursor: grab; margin-bottom: 1.5em;
}
.pj-viewer.dragging { cursor: grabbing; }
.pj-viewer.hot { cursor: pointer; }
.pj-viewer:focus-visible { box-shadow: 0 0 0 3px var(--pj-accent); }
.pj-viewer canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
@media (max-width: 767px) { .pj-viewer.reading { aspect-ratio: 10.5 / 14.8; } }
.pj-viewer.reading canvas { touch-action: none; }

.pj-loading {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: .85rem; letter-spacing: .04em;
  color: #3b4c5c; background: #B4C5D6; transition: opacity .5s;
}
.pj-loading.done { opacity: 0; pointer-events: none; }
.pj-hint {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); white-space: nowrap; max-width: calc(100% - 24px);
  overflow: hidden; text-overflow: ellipsis; margin: 0; font-size: .75rem; letter-spacing: .02em; color: #3d362c;
  background: rgba(255, 251, 243, .88); padding: 5px 12px; border-radius: 999px; pointer-events: none;
}
.pj-viewer.reading .pj-hint { top: auto; bottom: 12px; }
.pj-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center;
  padding: 0 12px 14px; pointer-events: none;
}
.pj-act {
  pointer-events: auto; font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1; color: #FFF8EC; background: #264653;
  border: 0; border-radius: 999px; padding: 14px 24px; min-height: 48px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(38, 70, 83, .28);
}
.pj-act:hover, .pj-act:focus { background: #1d3843; color: #FFF8EC; }
.pj-act:focus-visible { outline: 3px solid var(--pj-accent); outline-offset: 3px; }
.pj-readbar { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; z-index: 2; }
.pj-pager { display: flex; gap: 4px; background: rgba(255, 251, 243, .92); border-radius: 999px; padding: 3px; }
.pj-pg {
  font-family: inherit; font-weight: 600; font-size: .82rem; line-height: 1; color: #264653; background: transparent; border: 0;
  border-radius: 999px; padding: 9px 13px; min-height: 36px; cursor: pointer;
}
.pj-pager .pj-pg[aria-pressed="true"] { background: #264653; color: #FFF8EC; }
.pj-read-done { background: rgba(255, 251, 243, .92); }
.pj-pg:focus-visible { outline: 3px solid var(--pj-accent); outline-offset: 2px; }
.pj-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Fields */
.pj-form { display: grid; gap: 22px; margin: 0 0 1.4em; color: var(--pj-ink); }
.pj-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.pj-form legend { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--pj-muted); padding: 0; margin-bottom: 10px; font-weight: 600; }
.pj-field { display: grid; gap: 6px; min-width: 0; }
.pj-form label, .pj-lbl { font-weight: 600; font-size: .95rem; margin: 0; }
.pj-opt { font-weight: 400; color: var(--pj-muted); }
.pj-form input[type="text"], .pj-form textarea {
  box-sizing: border-box; font-family: inherit; width: 100%; font-size: 16px; line-height: 1.5; color: var(--pj-ink); background: var(--pj-surface);
  border: 1px solid var(--pj-line); border-radius: 10px; padding: 12px 14px; box-shadow: none; margin: 0;
}
.pj-form textarea { resize: vertical; min-height: 220px; }
.pj-form input:focus-visible, .pj-form textarea:focus-visible, .pj-form button:focus-visible { outline: 3px solid var(--pj-accent); outline-offset: 2px; }
.pj-form [aria-invalid="true"] { border-color: var(--pj-danger); }
.pj-err { margin: 0; color: var(--pj-danger); font-size: .85rem; }
.pj-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.pj-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--pj-muted); font-variant-numeric: tabular-nums; }
.pj-link {
  font-family: inherit; font-weight: 600; font-size: .88rem; line-height: 1; color: var(--pj-ink); background: none; border: 0; padding: 6px 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; box-shadow: none;
}
.pj-link:hover, .pj-link:focus { background: none; color: var(--pj-ink); }
.pj-sigpad { position: relative; width: 100%; max-width: 100%; aspect-ratio: 3 / 1; background: var(--pj-surface); border: 1px dashed var(--pj-muted); border-radius: 10px; overflow: hidden; }
.pj-sigpad::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 26%; border-bottom: 1px solid var(--pj-line); pointer-events: none; }
.pj-sigpad canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.pj-sig-ph { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: var(--pj-muted); font-size: .92rem; pointer-events: none; }
.pj-note { margin: 0; font-size: .88rem; color: var(--pj-muted); }
.plotteriet-julekort-page form.cart .single_add_to_cart_button { width: 100%; padding: 18px 24px; border-radius: 999px; font-size: 1.05rem; }
