/* Personalisation on the product page: the without / with choice, the fields it
   reveals, and a live preview of the typed text.
   Sits between size and the buy button, so it borrows the same visual language
   as the other choosers rather than announcing itself as a form. */

.pz {
    --pz-ink: #221e19;
    --pz-muted: #8b8377;
    --pz-hair: #ddd3c3;
    --pz-hair-soft: #ece4d7;
    --pz-field: #faf7f1;
    margin: 0 0 18px;
}

.pz-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.pz-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--pz-ink);
}

/* ── the two chips ──────────────────────────────────────────────────── */

.pz-chips {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.pz-chip {
    position: relative;
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 140px;
}

.pz-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pz-chip-face {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--pz-hair);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: var(--pz-ink);
    text-align: center;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.pz-chip:hover .pz-chip-face { border-color: var(--pz-ink); }

.pz-chip input:checked + .pz-chip-face {
    background: var(--pz-ink);
    color: #fff;
    border-color: var(--pz-ink);
}

.pz-chip input:focus-visible + .pz-chip-face {
    outline: 2px solid var(--pz-ink);
    outline-offset: 2px;
}

/* The surcharge is part of the choice, so it lives inside the chip rather than
   in fine print somewhere else. */
.pz-plus {
    font-size: 12.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(34, 30, 25, .08);
    white-space: nowrap;
}

.pz-chip input:checked + .pz-chip-face .pz-plus {
    background: rgba(255, 255, 255, .18);
}

.pz-plus.is-free {
    font-weight: 600;
    text-transform: lowercase;
}

/* ── the fields ─────────────────────────────────────────────────────── */

.pz-body {
    margin-top: 12px;
    padding: 16px 17px;
    border: 1px solid var(--pz-hair-soft);
    border-radius: 16px;
    background: var(--pz-field);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pz-body[hidden] { display: none; }

.pz-field { display: flex; flex-direction: column; gap: 7px; }

.pz-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pz-ink);
    margin: 0;
}

.pz-opt {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pz-muted);
    background: #fff;
    border: 1px solid var(--pz-hair-soft);
    padding: 2px 8px;
    border-radius: 999px;
}

.pz-input {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--pz-hair);
    background: #fff;
    font-size: 15px;
    color: var(--pz-ink);
}

textarea.pz-input { min-height: 64px; resize: vertical; }

.pz-input:focus {
    outline: none;
    border-color: var(--pz-ink);
}

.pz-counter {
    font-size: 11.5px;
    color: var(--pz-muted);
    font-variant-numeric: tabular-nums;
    min-height: 15px;
}

.pz-counter.is-low { color: #c2453b; font-weight: 600; }

.pz-hint { font-size: 11.5px; color: var(--pz-muted); }

/* ── fonts ──────────────────────────────────────────────────────────── */

.pz-fonts { display: flex; gap: 8px; flex-wrap: wrap; }

.pz-font { position: relative; cursor: pointer; }

.pz-font input { position: absolute; opacity: 0; pointer-events: none; }

.pz-font-face {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    min-height: 46px;
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--pz-hair);
    background: #fff;
    font-size: 16px;
    color: var(--pz-ink);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.pz-font-face img { max-height: 26px; width: auto; display: block; }

.pz-font input:checked + .pz-font-face {
    border-color: var(--pz-ink);
    box-shadow: inset 0 0 0 1px var(--pz-ink);
}

/* ── upload ─────────────────────────────────────────────────────────── */

.pz-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pz-upload input[type="file"] {
    flex: 1 1 180px;
    min-width: 0;
    font-size: 13px;
}

.pz-upload-state { font-size: 12.5px; font-weight: 600; }
.pz-upload-state.is-ok { color: #1f9d6b; }
.pz-upload-state.is-err { color: #c2453b; }
.pz-upload-state.is-busy { color: var(--pz-muted); }

/* ── preview ────────────────────────────────────────────────────────── */

/* A styled line rather than text laid over the product photo: it shows the
   spelling and the font honestly, without promising a placement nobody has
   agreed to yet. */
.pz-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #17130f;
    overflow: hidden;
}

.pz-preview[hidden] { display: none; }

.pz-preview-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(251, 248, 243, .45);
}

.pz-preview-text {
    font-size: 27px;
    line-height: 1.25;
    font-weight: 700;
    color: #fff;
    word-break: break-word;
    /* Reads like the lit signs the product actually is. */
    text-shadow: 0 0 18px rgba(255, 255, 255, .45);
}

.pz-flow { margin-top: 14px; }

@media (max-width: 575.98px) {
    .pz-chip { min-width: 100%; }
    .pz-preview-text { font-size: 23px; }
}
