/* Craft-table building blocks: tape, polaroids, paper scraps, stickers, buttons. */

/* ---------- washi tape ---------- */
.tape {
  position: absolute; z-index: 3; width: 112px; height: 30px;
  background-color: var(--accent-pink);
  background-image: repeating-linear-gradient(-45deg, var(--tape-stripe) 0 7px, transparent 7px 14px);
  opacity: .82;
  clip-path: polygon(2% 0, 98% 4%, 100% 25%, 97% 50%, 100% 78%, 98% 100%, 2% 96%, 0 70%, 3% 50%, 0 22%);
  box-shadow: 0 2px 6px var(--shadow-soft);
  pointer-events: none;
}
.tape-blue { background-color: var(--accent-blue); }
.tape-yellow { background-color: var(--accent-yellow); background-image: repeating-linear-gradient(90deg, var(--tape-stripe) 0 5px, transparent 5px 10px); }
.tape-green { background-color: var(--accent-green); }
.tape-purple { background-color: var(--accent-purple); background-image: radial-gradient(circle, var(--tape-stripe) 2.5px, transparent 3px); background-size: 12px 12px; }
.tape-top { top: -13px; left: 50%; transform: translateX(-50%) rotate(-2deg); }
.tape-tl { top: -10px; left: 10px; transform: rotate(-9deg); }
.tape-tr { top: -10px; right: 10px; transform: rotate(8deg); }

/* ---------- polaroid ---------- */
.polaroid {
  position: relative; margin: 0;
  background: var(--surface); color: var(--surface-text);
  padding: 12px;
  box-shadow: 0 14px 34px var(--shadow), 0 2px 4px var(--shadow-soft);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.polaroid .ph { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--photo-bg); border-radius: 3px; }
.polaroid .ph.portrait { aspect-ratio: 3 / 4; }
.polaroid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.polaroid figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 4px 2px; font-size: 1.35rem; color: var(--surface-text); }
.polaroid figcaption small { font: 600 .8rem/1 "Nunito", sans-serif; color: var(--surface-muted); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.tilt-l { transform: rotate(-2.2deg); }
.tilt-r { transform: rotate(1.8deg); }
.tilt-l:hover, .tilt-r:hover { transform: rotate(0) scale(1.015); }
/* photo placeholder until the customer's photos arrive */
.ph-pending { display: grid; place-items: center; height: 100%; padding: 16px; text-align: center; font-size: 1.5rem; color: var(--surface-muted);
  background-image: repeating-linear-gradient(-45deg, var(--line) 0 2px, transparent 2px 14px); }

/* handwritten labels on photos; position comes from data as inline left/top (label centre) */
/* labels scale with the photo, not the viewport, so small cards stay readable */
.ph.annotated { overflow: visible; container-type: inline-size; }
.anno {
  position: absolute; z-index: 2;
  font-size: clamp(.85rem, 6cqi, 1.6rem);
  color: var(--label-text); background: var(--label-bg);
  padding: 2px 12px; border-radius: 999px; box-shadow: 0 4px 12px var(--shadow);
  white-space: nowrap; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-3deg);
}
.anno:nth-of-type(2n) { transform: translate(-50%, -50%) rotate(2.5deg); }
.anno-price, .anno-price:nth-of-type(n) {
  font-size: clamp(1.1rem, 8cqi, 2.3rem); padding: 2px 16px;
  background: var(--accent-yellow); color: var(--on-accent);
  transform: translate(-50%, -50%) rotate(-6deg);
}
.arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1;
  filter: drop-shadow(0 0 1px var(--label-bg)) drop-shadow(0 0 2px var(--label-bg)); }
.arrows path { fill: none; stroke: var(--label-text); stroke-width: 2.4; stroke-dasharray: 7 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.svg-defs { position: absolute; width: 0; height: 0; }
#arrowhead path { fill: none; stroke: var(--label-text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- torn paper scraps ---------- */
.scrap { filter: drop-shadow(0 10px 18px var(--shadow)); position: relative; }
.scrap-in {
  background: var(--note-yellow); color: var(--note-text);
  padding: 30px 26px;
  clip-path: polygon(0 5px, 6% 1px, 12% 7px, 19% 2px, 26% 6px, 33% 0, 41% 5px, 48% 2px, 55% 7px, 62% 1px, 69% 6px, 76% 3px, 83% 7px, 90% 1px, 96% 5px, 100% 2px,
    calc(100% - 4px) 30%, 100% 55%, calc(100% - 5px) 80%, 100% calc(100% - 4px),
    95% calc(100% - 1px), 89% calc(100% - 6px), 82% calc(100% - 2px), 75% calc(100% - 7px), 68% calc(100% - 3px), 60% calc(100% - 6px), 53% calc(100% - 1px), 46% calc(100% - 5px), 39% calc(100% - 2px), 31% calc(100% - 7px), 24% calc(100% - 3px), 17% calc(100% - 6px), 10% calc(100% - 2px), 4% calc(100% - 5px), 0 calc(100% - 2px),
    4px 78%, 0 52%, 5px 28%);
}
.scrap-pink .scrap-in { background: var(--note-pink); }
.scrap-blue .scrap-in { background: var(--note-blue); }
.scrap-green .scrap-in { background: var(--note-green); }
.scrap-purple .scrap-in { background: var(--note-purple); }
.scrap h2, .scrap h3 { color: var(--note-text); }
.scrap h3.display { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); margin-bottom: 10px; }
.tilt-scrap-l { transform: rotate(-1deg); }
.tilt-scrap-r { transform: rotate(1.2deg); }

/* ---------- stickers (chips) ---------- */
.stickers { display: flex; flex-wrap: wrap; gap: 10px 8px; padding: 0; margin: 0; list-style: none; }
.stk {
  display: inline-flex; align-items: center; gap: .45em;
  min-height: 40px; padding: 6px 14px; border-radius: 999px;
  font: 600 .95rem/1.2 "Fredoka", "Nunito", sans-serif;
  color: var(--chip-text); background: var(--chip-default);
  border: 3px solid var(--chip-edge);
  box-shadow: 0 3px 8px var(--shadow-soft);
  transform: rotate(var(--r, 0deg));
}
.stk .n {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--chip-badge); color: var(--chip-badge-text); font-size: .78rem; font-weight: 700;
}
.c-red { background: var(--chip-red); } .c-orange { background: var(--chip-orange); } .c-yellow { background: var(--chip-yellow); }
.c-green { background: var(--chip-green); } .c-blue { background: var(--chip-blue); } .c-purple { background: var(--chip-purple); } .c-pink { background: var(--chip-pink); }
.stickers li:nth-child(3n+1) { --r: -2deg; } .stickers li:nth-child(3n+2) { --r: 1.5deg; } .stickers li:nth-child(4n+3) { --r: -1deg; }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: 10px 22px; border-radius: 999px;
  font: 600 1.05rem/1 "Fredoka", "Nunito", sans-serif; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; border: 3px solid transparent;
  transition: transform .2s, box-shadow .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent-pink); color: var(--on-accent); border-color: var(--chip-edge); box-shadow: 0 6px 16px var(--shadow); }
.btn-whatsapp { background: var(--accent-green); }
.btn-secondary { background: var(--surface); color: var(--on-accent); border-color: var(--button-outline); }
.btn:hover { transform: translateY(-2px) rotate(-1deg); }

/* ---------- bead chain divider ---------- */
.beadrow { position: relative; display: flex; justify-content: center; gap: 6px; overflow: hidden; padding: 22px 0; margin: 0; list-style: none; }
.beadrow::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--line); }
.beadrow li { flex: none; width: 18px; height: 18px; border-radius: 50%; position: relative; z-index: 1;
  background: radial-gradient(circle, var(--bg) 0 3px, var(--c) 3.5px); box-shadow: inset 0 -2px 2px var(--bead-shade); }
.beadrow li:nth-child(7n+1) { --c: var(--accent-red); } .beadrow li:nth-child(7n+2) { --c: var(--accent-orange); } .beadrow li:nth-child(7n+3) { --c: var(--accent-yellow); }
.beadrow li:nth-child(7n+4) { --c: var(--accent-green); } .beadrow li:nth-child(7n+5) { --c: var(--accent-blue); } .beadrow li:nth-child(7n+6) { --c: var(--accent-purple); } .beadrow li:nth-child(7n) { --c: var(--accent-pink); }

/* content the customer still has to supply */
.todo { background: var(--note-yellow); color: var(--note-text); padding: 0 .3em; border-radius: 3px; font-style: italic; }

@media (max-width: 479px) {
  .tilt-l { transform: rotate(-1.4deg); }
  .tilt-r { transform: rotate(1.2deg); }
  .polaroid figcaption { font-size: 1.2rem; }
}
