/* ============================================================
   print-order.css — Print Order page (template-print-order.php)
   Product configurator: preview on the left, options + upload +
   delivery form on the right. Uses the global tokens from
   css/global.css (navy fg, coral/gold accent gradient, cream bg).
   Dock and footer styles live in css/global.css.
   ============================================================ */

/* ============================================================
   HERO — compact full-width band: breadcrumb, one-line title and
   short intro on the left, CTAs on the right. Kept short so the
   order form shows on the first screen.
   ============================================================ */
.po-hero {
    position: relative;
    /* warm tint at the top fading to plain white, so the hero flows into the form section */
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ffffff 100%),
        radial-gradient(70% 140% at 100% 0%, rgba(247, 180, 44, 0.16), transparent 65%),
        radial-gradient(60% 140% at 0% 0%, rgba(252, 87, 94, 0.10), transparent 65%),
        #ffffff;
    padding: clamp(96px, 7vw, 112px) clamp(16px, 6vw, 96px) clamp(24px, 2.5vw, 32px);
    font-family: "Karla", sans-serif;
    color: var(--color-fg);
}

.po-hero__inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px 48px;
}

.po-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-muted);
}
.po-hero__breadcrumb a { color: var(--color-muted); text-decoration: none; transition: color 0.2s; }
.po-hero__breadcrumb a:hover { color: var(--color-fg); }
.po-hero__breadcrumb span[aria-hidden] { opacity: 0.4; }
.po-hero__bc-current { color: var(--color-fg); font-weight: 700; }

.po-hero__title {
    margin: 0 0 8px;
    font-size: clamp(30px, 3.4vw, 46px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.po-hero__title em {
    font-style: italic;
    font-weight: 700;
    padding-right: 0.06em;
    background: linear-gradient(135deg, #f7b42c 0%, #fc575e 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.po-hero__sub {
    margin: 0;
    max-width: 640px;
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.55;
    color: var(--color-muted);
}

.po-hero__ctas {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}
.po-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: box-shadow 0.3s ease, transform 0.3s ease, color 0.2s;
}
.po-hero__btn--primary {
    padding: 8px 8px 8px 24px;
    background: linear-gradient(315deg, #f7b42c 0%, #fc575e 74%);
    color: #faf8f4;
}
.po-hero__btn--primary:hover { color: #fff; box-shadow: 0 14px 30px rgba(252, 87, 94, 0.3); transform: translateY(-2px); }
.po-hero__btn--ghost {
    padding: 4px 0;
    color: var(--color-fg);
    border-bottom: 2px solid rgba(252, 87, 94, 0.45);
    border-radius: 0;
}
.po-hero__btn--ghost:hover { color: var(--color-accent); border-color: var(--color-accent); }
button.po-hero__btn--ghost { background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }

@media (max-width: 860px) {
    .po-hero__inner { flex-direction: column; align-items: flex-start; }
}

.po {
    --po-grad: linear-gradient(135deg, #f7b42c, #fc575e);
    --po-line: rgba(14, 27, 51, 0.14);
    --po-panel: #faf8f4;
    --po-err: #d93a3a;
    background: #ffffff;
    padding: clamp(28px, 3vw, 40px) clamp(16px, 6vw, 96px) clamp(56px, 7vw, 96px);
    font-family: "Karla", sans-serif;
    color: var(--color-fg);
}

.po__inner {
    max-width: 1120px;
    margin: 0 auto;
}

/* product description under the Product dropdown */
.po-type-desc { margin: -6px 4px 18px; font-size: 13px; line-height: 1.5; color: var(--color-muted); }

/* ---- layout ---- */
.po__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.po__visual { position: sticky; top: 110px; }

.po__stage {
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    background: var(--po-panel);
    border: 1px solid rgba(14, 27, 51, 0.07);
}
.po__stage svg { display: block; width: 100%; height: 100%; }

/* photo preview — whole image shown, centred in the square stage */
.po__stage.is-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
}
.po__stage.is-photo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border-radius: 18px;
    transition: transform 0.4s ease;
}
.po__stage.is-photo img.is-turned { transform: rotate(90deg); }

.po__stage-note {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--color-muted);
    text-align: center;
}

.po__form { min-width: 0; }

/* honeypot */
.po__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- outlined fields ---- */
.po-field {
    position: relative;
    min-width: 0;
    margin: 0 0 18px;
    padding: 0 14px;
    border: 1.5px solid var(--po-line);
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.po-field legend {
    padding: 0 6px;
    margin-left: -4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--color-fg);
}
.po-field:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(252, 87, 94, 0.15);
}
.po-field.is-invalid { border-color: var(--po-err); }
.po-field.is-invalid legend { color: var(--po-err); }

.po-field select,
.po-field input,
.po-field textarea {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 16px; /* 16px stops iOS zooming on focus */
    color: var(--color-fg);
    padding: 4px 0 11px;
    outline: none;
}
.po-field textarea { resize: vertical; min-height: 64px; }

.po-field--type { margin-bottom: 22px; border-width: 2px; border-color: var(--color-fg); }
.po-field--type select { font-weight: 700; }

/* ---- orientation toggle ---- */
.po-orient {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 0 18px;
    padding-top: 4px;
    border: 1.5px solid var(--po-line);
    border-radius: 12px;
    background: #fff;
}
.po-orient__cap {
    position: absolute;
    top: -9px;
    left: 12px;
    padding: 0 6px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.po-orient label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    cursor: pointer;
    font-size: 15px;
}
.po-orient label + label { border-left: 1px solid var(--po-line); }
.po-orient input { position: absolute; opacity: 0; pointer-events: none; }
.po-orient__sw { flex: none; border-radius: 3px; background: #e7e2d8; transition: background 0.2s; }
.po-orient__sw--h { width: 24px; height: 16px; }
.po-orient__sw--v { width: 16px; height: 24px; }
.po-orient input:checked + .po-orient__sw { background: var(--po-grad); }
.po-orient input:focus-visible + .po-orient__sw { outline: 2px solid var(--color-fg); outline-offset: 2px; }

/* ---- production time ---- */
.po-prod-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px 4px;
    font-size: 13px;
    font-weight: 700;
}
.po-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-fg);
    color: #fff;
    font-size: 11px;
    cursor: help;
}
.po-prod {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 18px;
    border: 1.5px solid var(--po-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.po-prod label { cursor: pointer; }
.po-prod label + label { border-left: 1px solid var(--po-line); }
.po-prod input { position: absolute; opacity: 0; pointer-events: none; }
.po-prod span {
    display: block;
    height: 100%;
    padding: 11px 6px;
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
    transition: background 0.2s, color 0.2s;
}
.po-prod input:checked + span { background: var(--po-grad); color: #fff; font-weight: 700; }
.po-prod input:focus-visible + span { outline: 2px solid var(--color-fg); outline-offset: -4px; }

/* ---- accordions ---- */
.po-acc {
    margin: 0 0 10px;
    border: 1px solid rgba(14, 27, 51, 0.07);
    border-radius: 12px;
    background: var(--po-panel);
}
.po-acc button {
    all: unset;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.po-acc button:focus-visible { outline: 2px solid var(--color-fg); border-radius: 12px; }
.po-acc__pm { font-size: 18px; font-weight: 400; line-height: 1; }
.po-acc__body { display: none; padding: 0 16px 14px; font-size: 14px; line-height: 1.55; color: var(--color-muted); }
.po-acc.is-open .po-acc__body { display: block; }

/* ---- subtotal ---- */
.po-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 18px 0 22px;
    padding: 16px 20px;
    border-radius: 14px;
    background: var(--color-fg);
    color: #fff;
    font-weight: 700;
}
.po-subtotal__price { font-size: 22px; font-variant-numeric: tabular-nums; }

.po-unavailable { margin: -10px 0 20px; padding: 12px 16px; border-radius: 12px; background: #fff4e0; font-size: 14px; text-align: center; }
.po-unavailable[hidden] { display: none; }
.po-unavailable a { color: var(--color-accent); font-weight: 700; }

/* ---- buttons / uploads ---- */
.po-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.2s;
}
.po-btn:hover { transform: translateY(-2px); }

.po-uploads { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 8px; }
.po-uploads[hidden] { display: none; }
.po-btn--upload { padding: 13px 28px; background: var(--color-fg); color: #fff; }
.po-btn--upload:hover { box-shadow: 0 10px 22px rgba(14, 27, 51, 0.2); }
.po-btn--upload.is-done { background: var(--po-grad); }
.po-btn--upload input { display: none; }
.po-btn--upload:focus-within { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.po-file-line { min-height: 20px; margin-bottom: 4px; text-align: center; font-size: 13px; color: var(--color-muted); word-break: break-word; }
.po-file-line__rm { border: 0; background: none; padding: 0; font: inherit; color: var(--color-accent); text-decoration: underline; cursor: pointer; }

.po-hint { margin: 6px 0 0; text-align: center; font-size: 14px; color: var(--color-muted); }
.po-hint[hidden] { display: none; }
.po-hint--small { font-size: 12px; }

/* ---- details + delivery ---- */
.po-ship { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--po-line); }
.po-ship[hidden] { display: none; }
.po-ship__title { margin: 0 0 16px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.po-ship__title:not(:first-child) { margin-top: 8px; }

.po-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.po-row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0 14px; }

#poAddressBox[hidden],
.po-pickup-note[hidden],
.po-error[hidden],
.po-result[hidden] { display: none; }

.po-captcha { margin: 4px 0 18px; }

.po-pickup-note { margin-bottom: 18px; padding: 13px 16px; border-radius: 12px; background: var(--po-panel); font-size: 14px; }

.po-error {
    margin: 4px 0 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fdecec;
    color: var(--po-err);
    font-size: 14px;
    font-weight: 600;
}

.po-submit {
    display: flex;
    width: 100%;
    max-width: 360px;
    margin: 22px auto 10px;
    padding: 8px 8px 8px 28px;
    justify-content: space-between;
    background: linear-gradient(315deg, #f7b42c 0%, #fc575e 74%);
    color: #faf8f4;
    font-size: 16px;
}
.po-submit:hover { box-shadow: 0 14px 30px rgba(252, 87, 94, 0.3); }
.po-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ---- result ---- */
.po-result {
    margin-top: 24px;
    padding: 22px 24px;
    border-radius: 20px;
    background: var(--po-panel);
    border: 1px solid rgba(14, 27, 51, 0.07);
}
.po-result h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; }
.po-result p { margin: 0 0 16px; color: var(--color-muted); line-height: 1.55; }
.po-result dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.po-result dt { font-weight: 700; }
.po-result dd { margin: 0; word-break: break-word; }

/* ---- responsive ---- */
@media (max-width: 860px) {
    .po__grid { grid-template-columns: 1fr; }
    .po__visual { position: static; max-width: 420px; width: 100%; margin: 0 auto; }
}
@media (max-width: 520px) {
    .po-row2, .po-row3 { grid-template-columns: 1fr; }
    .po-result dl { grid-template-columns: 1fr; }
    .po-result dd { margin-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .po-btn, .po-btn:hover { transition: none; transform: none; }
}

/* ---- custom dropdown (js/print-order-dropdown.js) ---- */
.po-dd__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}
.po-dd { position: relative; }
.po-dd__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 4px 0 12px;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 16px;
    color: var(--color-fg);
    text-align: left;
    cursor: pointer;
}
.po-dd__btn:focus { outline: none; }
.po-dd__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-dd__value.is-placeholder { color: var(--color-muted); }
.po-dd__chev {
    flex: none;
    width: 30px;
    height: 30px;
    padding: 10px 9px;
    border-radius: 50%;
    background: var(--po-panel);
    color: var(--color-fg);
    transition: transform 0.25s ease, background 0.2s, color 0.2s;
}
.po-dd__btn:hover .po-dd__chev,
.po-dd.is-open .po-dd__chev { background: var(--po-grad); color: #fff; }
.po-dd.is-open .po-dd__chev { transform: rotate(180deg); }

.po-dd__list {
    position: absolute;
    z-index: 30;
    top: calc(100% + 10px);
    left: -16px;
    right: -16px;
    max-height: 280px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(14, 27, 51, 0.08);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(14, 27, 51, 0.16), 0 2px 6px rgba(14, 27, 51, 0.06);
    outline: none;
    animation: po-dd-in 0.16s ease-out;
}
.po-dd.is-up .po-dd__list { top: auto; bottom: calc(100% + 18px); }
.po-dd__list[hidden] { display: none; }
@keyframes po-dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.po-dd__opt {
    position: relative;
    padding: 10px 14px 10px 30px;
    border-radius: 9px;
    font-size: 15px;
    line-height: 1.35;
    color: var(--color-fg);
    cursor: pointer;
}
.po-dd__opt.is-placeholder { color: var(--color-muted); }
.po-dd__opt.is-active { background: var(--po-panel); }
.po-dd__opt[aria-selected="true"] { font-weight: 700; }
.po-dd__opt[aria-selected="true"]::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--po-grad);
}
.po-field:has(.po-dd.is-open) { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(252, 87, 94, 0.15); z-index: 5; }
@media (prefers-reduced-motion: reduce) {
    .po-dd__list { animation: none; }
    .po-dd__chev { transition: none; }
}

/* shipping details inside the Shipping & Delivery accordion */
.po-ship-info h4 { margin: 4px 0 4px; font-size: 14px; font-weight: 800; color: var(--color-fg); }
.po-ship-info h4 + p { margin: 0 0 12px; }
.po-ship-est { margin: 0; padding-top: 10px; border-top: 1px dashed var(--po-line); font-weight: 600; color: var(--color-fg); }
