/* The code box (ui/partner-code.mjs): its layout and its ticket. The field and the buttons are the shared pieces, so
   each brand's own look dresses them (BuildMyPet's bricks: ui/components.css; Telepawt's chunky outline:
   ui/look-telepawt.css). Every box's edge is the same all round (AGENTS.md); a ticket is tinted, never striped. */
.pc{display:grid;min-width:0;margin:0 0 24px}
.pc-form,.pc-done{display:grid;gap:10px;min-width:0}
.pc :is(.pc-form,.pc-done)[hidden]{display:none}
.pc-label{font-size:15px;font-weight:800;line-height:1.35;color:var(--pb-ink);text-wrap:balance}
.pc-row{display:flex;align-items:stretch;gap:10px;min-width:0}
/* The order card makes every button full width (journey.css .journey-card .pb-button): here the field takes the room. */
.pc .pc-row .pc-input{flex:1 1 0;width:auto;min-width:0;font-weight:800;letter-spacing:.08em;font-variant-numeric:tabular-nums}
.pc .pc-row .pc-apply{flex:none;width:auto;min-width:112px;margin:0}
/* While it checks, the busy bricks (or Telepawt's paws) take the word's place without the button changing size. */
.pc-apply[aria-busy=true]{cursor:progress}
.pc-message{margin:0;font-size:14px;line-height:1.45;font-weight:650;text-wrap:pretty}
.pc-message:empty{display:none}
.pc:is([data-state=invalid],[data-state=failed]) .pc-message{color:var(--pb-danger,#A52828)}
.pc[data-state=limited] .pc-message{color:#674C00}
.pc.is-shaking .pc-input{animation:pc-shake .4s cubic-bezier(.36,.07,.19,.97)}
@keyframes pc-shake{20%,60%{translate:-6px 0}40%,80%{translate:6px 0}}

/* Accepted: a ticket with a green tick, the code and the saving, Remove at its end. */
.pc-ticket{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:6px 14px;padding:14px 10px 14px 16px;border:2px solid #9fdcbd;border-radius:18px;background:var(--pb-green-soft,#E3F7EE);color:var(--pb-ink);outline:0}
.pc-tick-box{display:grid;place-items:center}
.pc-tick{display:block;width:36px;height:36px;overflow:visible}
.pc-tick circle{fill:var(--pb-green-strong,#1A8754);transform-box:fill-box;transform-origin:center}
.pc-tick path{fill:none;stroke:#fff;stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16}
.pc-ticket-text{display:grid;gap:2px;min-width:0}
.pc-code{font-size:18px;font-weight:800;line-height:1.2;letter-spacing:.08em;white-space:nowrap}
.pc-code[data-long]{white-space:normal;overflow-wrap:anywhere}
.pc-saving{font-size:15px;font-weight:700;line-height:1.35;color:var(--pb-green-text,#0E6B41);text-wrap:balance}
.pc .pc-ticket .pc-remove{width:auto;min-height:44px;margin:0}
.pc .pc-done .pc-action{width:100%;margin:6px 0 0}
@media(prefers-reduced-motion:no-preference){
 .pc-done:not([hidden]) .pc-ticket{animation:pc-in .42s var(--pb-click,cubic-bezier(.3,1.5,.5,1)) backwards}
 .pc-done:not([hidden]) .pc-tick circle{animation:pc-pop .4s .12s var(--pb-click,cubic-bezier(.3,1.5,.5,1)) backwards}
 .pc-done:not([hidden]) .pc-tick path{animation:pc-draw .3s .34s ease-out backwards}
}
@keyframes pc-in{from{opacity:0;transform:translateY(6px) scale(.97)}}
@keyframes pc-pop{from{transform:scale(0)}}
@keyframes pc-draw{from{stroke-dashoffset:16}}
@media(prefers-reduced-motion:reduce){.pc.is-shaking .pc-input{animation:none}}
/* A narrow card: Apply under the field, as wide as it. */
@media(max-width:380px){.pc-row{flex-wrap:wrap}.pc .pc-row .pc-apply{flex:1 1 100%}.pc-ticket{grid-template-columns:auto minmax(0,1fr)}.pc .pc-ticket .pc-remove{grid-column:2;justify-self:start;min-height:36px;padding-inline:0}}

/* Telepawt: the ticket outlined like its cards, the code in the site's lettering, the tick its glossy green. */
body[data-brand="telepawt"] .pc-label{color:var(--tp-ink)}
body[data-brand="telepawt"] .pc-input{letter-spacing:.06em}
body[data-brand="telepawt"] .pc-ticket{border:3px solid var(--tp-ink);background:#eafbe0;color:var(--tp-ink)}
body[data-brand="telepawt"] .pc-tick circle{fill:#47b31b;stroke:var(--tp-ink);stroke-width:2}
body[data-brand="telepawt"] .pc-code{font:400 22px/1.1 var(--tp-display);letter-spacing:.04em}
body[data-brand="telepawt"] .pc-saving{color:#1d6b0a}
body[data-brand="telepawt"] .pc:is([data-state=invalid],[data-state=failed]) .pc-message{color:#b4231b}
