/* Programme book portal. Mobile first: the book team read this on a phone in a corridor. */
.pb-portal { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.pb-portal h2 { margin: 0 0 .25rem; font-size: 1.4rem; }
.pb-sub { margin: 0 0 1rem; opacity: .75; font-size: .9rem; }

.pb-signin { max-width: 26rem; }
.pb-signin label { display: block; margin: .75rem 0 .25rem; font-size: .9rem; }
.pb-signin input { width: 100%; padding: .6rem; font-size: 1rem; box-sizing: border-box; }
.pb-signin button { margin-top: .75rem; padding: .6rem 1rem; font-size: 1rem; cursor: pointer; }
.pb-message { margin-top: .75rem; min-height: 1.2em; }

.pb-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.pb-tallies { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.pb-tally { padding: .4rem .7rem; border-radius: .4rem; background: rgba(127,127,127,.12); text-align: center; min-width: 4.5rem; }
.pb-tally strong { display: block; font-size: 1.2rem; }
.pb-tally span { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.pb-tally.pb-awaiting-artwork { background: rgba(200,80,60,.16); }
.pb-tally.pb-awaiting-message { background: rgba(200,150,50,.16); }
.pb-tally.pb-ready { background: rgba(70,150,90,.16); }
.pb-tally.pb-approved { background: rgba(60,110,190,.16); }

/* The table is wide by nature; let it scroll rather than crushing the columns that matter. */
.pb-scroll { overflow-x: auto; margin-top: 1rem; }
.pb-grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pb-grid th, .pb-grid td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid rgba(127,127,127,.25); vertical-align: top; }
.pb-grid th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }

.pb-customer .pb-name { display: block; font-weight: 600; }
.pb-contact { display: block; font-size: .82rem; }
.pb-dedication { max-width: 24rem; }
.pb-none { opacity: .5; font-style: italic; }
.pb-chip { display: inline-block; padding: .05rem .4rem; border-radius: .25rem; font-size: .7rem; text-transform: uppercase; background: rgba(60,110,190,.18); }

.pb-asset { margin: 0 0 .5rem; }
.pb-asset img { display: block; max-width: 120px; height: auto; border-radius: .25rem; }
.pb-asset figcaption { font-size: .75rem; opacity: .8; margin-top: .2rem; }

.pb-row.pb-awaiting-artwork .pb-status { color: #b4472f; }
.pb-row.pb-ready .pb-status { color: #2f7a4a; }

.pb-upload { display: inline-block; margin-top: .4rem; cursor: pointer; }
.pb-upload input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pb-upload span { display: inline-block; padding: .3rem .6rem; border: 1px dashed rgba(127,127,127,.6); border-radius: .3rem; font-size: .78rem; }
.pb-upload:hover span { border-style: solid; }
.pb-upload-msg { display: block; font-size: .75rem; margin-top: .3rem; opacity: .9; }

/* Editing controls: present, but quiet enough that the row still reads as data. */
.pb-remove { display: inline-block; border: 1px solid rgba(180,71,47,.5); background: #fff; color: #b4472f;
    border-radius: .25rem; font-size: .7rem; padding: .1rem .4rem; cursor: pointer; margin-top: .25rem; }
.pb-remove:hover { background: #b4472f; color: #fff; }
.pb-spec-line { display: block; }
.pb-spec-line.pb-too-small { color: #b4472f; font-weight: 600; }
.pb-warn { display: block; font-size: .72rem; color: #b4472f; }
/* Every control states BOTH its colours.
 *
 * These used to set `background: none` and no colour, so they inherited the theme's text
 * colour — which on this theme is white, giving white text in a white bubble: a button you
 * could click but could not read. A control dropped into somebody else's stylesheet cannot
 * inherit either half and still be legible, so each one carries its own pair. */
.pb-ded-edit, .pb-approve, .pb-unapprove, .pb-notes-toggle, .pb-ded-save, .pb-ded-cancel,
.pb-note-add, .pb-download-one, .pb-filter, .pb-kind-set {
    border: 1px solid rgba(0,0,0,.25); background: #fff; color: #1e1e1e; border-radius: .25rem;
    font-size: .72rem; padding: .12rem .4rem; cursor: pointer; margin-top: .25rem;
    line-height: 1.6; font-family: inherit;
}
.pb-ded-edit:hover, .pb-approve:hover, .pb-unapprove:hover, .pb-notes-toggle:hover,
.pb-ded-save:hover, .pb-ded-cancel:hover, .pb-note-add:hover, .pb-download-one:hover,
.pb-filter:hover { background: #f1f1f1; color: #000; }
.pb-approve { border-color: rgba(60,110,190,.55); color: #24457d; font-weight: 600; }
.pb-approve:hover { background: #2f5ea8; color: #fff; }
.pb-ded-edit { opacity: .55; }
.pb-dedication:hover .pb-ded-edit { opacity: 1; }
.pb-ded-form textarea, .pb-note-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .85rem; }
.pb-row-msg { display: block; font-size: .72rem; opacity: .85; margin-top: .25rem; }
.pb-status-label { display: block; }

.pb-detail > td { background: rgba(127,127,127,.06); }
.pb-notes { max-width: 46rem; }
.pb-note { margin: 0 0 .6rem; }
.pb-note header { font-size: .75rem; opacity: .75; display: flex; gap: .5rem; align-items: center; }
.pb-note p { margin: .15rem 0 0; font-size: .88rem; white-space: pre-wrap; }
.pb-note-form { margin-top: .5rem; }

/* The customer's cards on their account page. */
.pb-account { max-width: 46rem; }
.pb-deadline { font-weight: 600; }
.pb-card { border: 1px solid rgba(127,127,127,.3); border-radius: .5rem; padding: 1rem; margin-bottom: 1.25rem; }
.pb-card h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.pb-card h3 small { font-weight: 400; opacity: .6; margin-left: .5rem; font-size: .8rem; }
.pb-card h4 { margin: 0 0 .35rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.pb-card-body { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.pb-card-art, .pb-card-msg { flex: 1 1 16rem; min-width: 0; }
.pb-locked { background: rgba(200,150,50,.14); border-radius: .35rem; padding: .5rem .7rem; font-size: .88rem; }
.pb-asset-line { margin: .2rem 0; font-size: .9rem; word-break: break-word; }
.pb-spec { opacity: .65; font-size: .8rem; display: block; }
.pb-hint { font-size: .78rem; opacity: .75; margin: .35rem 0 0; }
.pb-ded { width: 100%; box-sizing: border-box; font: inherit; font-size: .9rem; }
.pb-ded-msg, .pb-ask-msg { display: block; font-size: .78rem; margin-top: .3rem; opacity: .9; }
.pb-ask { margin-top: 1rem; border-top: 1px solid rgba(127,127,127,.25); padding-top: .75rem; }
.pb-ask summary { cursor: pointer; font-size: .9rem; }
.pb-ask-body { width: 100%; box-sizing: border-box; font: inherit; font-size: .9rem; margin-top: .4rem; }

/* The upload box on the product page, above Add to cart. */
.pb-checkout { margin: 1rem 0; padding: 1rem; border: 1px solid rgba(127,127,127,.3); border-radius: .5rem; }
.pb-checkout h4 { margin: 0 0 .3rem; font-size: .95rem; }
.pb-checkout label[for="pb-staged-message"] { display: block; margin-top: .75rem; font-size: .85rem; }
.pb-checkout textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .9rem; }
.pb-staged-list { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .85rem; }
.pb-staged-list li::before { content: "✓ "; color: #2f7a4a; }
.pb-staged-list li.has-thumb { display: flex; align-items: center; gap: .6rem; margin: .4rem 0; }
.pb-staged-list li.has-thumb::before { content: none; }
.pb-staged-thumb { width: 104px; height: 104px; flex: 0 0 auto; border-radius: 4px; border: 1px solid rgba(0,0,0,.12); }

.pb-cust-form { margin-top: 1rem; padding-top: .75rem; border-top: 1px dashed rgba(127,127,127,.35); }
.pb-cust-form h5 { margin: 0 0 .2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.pb-cust-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .88rem; }
.pb-cust-send { border: 1px solid rgba(60,110,190,.6); background: #fff; color: #2f5ea8; border-radius: .25rem;
    font-size: .75rem; padding: .18rem .5rem; cursor: pointer; margin-top: .3rem; }
.pb-cust-send:hover { background: #2f5ea8; color: #fff; }
.pb-cust-msg { display: block; font-size: .75rem; margin-top: .3rem; }

.pb-bulk { margin: .25rem 0 0; }
.pb-download-all { border: 1px solid rgba(60,110,190,.6); background: #fff; color: #2f5ea8; border-radius: .25rem;
    font-size: .78rem; padding: .25rem .6rem; cursor: pointer; }
.pb-download-all:hover { background: #2f5ea8; color: #fff; }
.pb-manifest { font-size: .72rem; margin-left: .5rem; opacity: .8; }
.pb-bulk-msg { display: block; font-size: .75rem; margin-top: .3rem; }
.pb-download { display: inline-block; border: 1px solid rgba(60,110,190,.5); color: #2f5ea8; text-decoration: none;
    border-radius: .25rem; font-size: .7rem; padding: .1rem .4rem; margin-top: .25rem; margin-right: .25rem; }
.pb-download:hover { background: #2f5ea8; color: #fff; }

/* The conversation. Deliberately looks different from internal notes, so nobody types a private
   remark into the box the family can read. */
.pb-thread { list-style: none; margin: .5rem 0; padding: 0; }
.pb-msg { margin: 0 0 .5rem; padding: .45rem .6rem; border-radius: .4rem; max-width: 40rem; }
.pb-msg-in  { background: rgba(127,127,127,.12); }
.pb-msg-out { background: rgba(60,110,190,.12); }
.pb-msg header { font-size: .74rem; opacity: .75; display: flex; gap: .5rem; align-items: center; }
.pb-msg p { margin: .15rem 0 0; font-size: .88rem; white-space: pre-wrap; }
.pb-thread-wrap h5, .pb-notes h5 { margin: 0 0 .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.pb-thread-wrap h5 .pb-hint, .pb-notes h5 .pb-hint { text-transform: none; letter-spacing: 0; margin-left: .4rem; }
.pb-notes { margin-top: 1rem; }


/* ---------------------------------------------------------------- money tallies */
.pb-tallies.pb-money { margin-top: .5rem; }
.pb-money .pb-tally { min-width: 6.5rem; }
.pb-money .pb-tally strong { font-size: 1.05rem; }
.pb-tally.pb-money-business { background: rgba(60,110,190,.14); }
.pb-tally.pb-money-family   { background: rgba(150,90,170,.14); }
.pb-tally.pb-money-unset    { background: rgba(127,127,127,.14); }
.pb-tally.pb-money-total    { background: rgba(70,150,90,.18); }

/* ------------------------------------------------------------- search + filter */
.pb-toolbar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: 1rem 0 .5rem; }
.pb-search-wrap { flex: 1 1 18rem; }
.pb-search {
    width: 100%; box-sizing: border-box; padding: .45rem .6rem; font: inherit; font-size: .9rem;
    border: 1px solid rgba(0,0,0,.25); border-radius: .3rem; background: #fff; color: #1e1e1e;
}
.pb-filters { display: flex; gap: .25rem; flex-wrap: wrap; }
.pb-filter { margin-top: 0; padding: .3rem .6rem; font-size: .78rem; }
.pb-filter.is-on { background: #2f5ea8; color: #fff; border-color: #2f5ea8; font-weight: 600; }
.pb-filter.is-on:hover { background: #24457d; color: #fff; }
.pb-filter-count { margin: 0; font-size: .8rem; opacity: .75; }
.pb-row.is-hidden, .pb-detail.is-hidden { display: none; }

/* ------------------------------------------------------------------ order cell */
.pb-amount { display: block; font-size: .85rem; font-weight: 600; opacity: .85; }
.pb-kind-wrap { display: block; margin-top: .3rem; }
.pb-kind-set { max-width: 100%; }
.pb-company { display: block; font-size: .82rem; font-style: italic; opacity: .85; }
.pb-address { display: block; margin: .25rem 0 0; font-size: .75rem; font-style: normal; opacity: .7; line-height: 1.35; }
.pb-download-one { display: inline-block; margin-top: .4rem; }

/* ------------------------------------------- the customer's own view of artwork */
.pb-my-assets { list-style: none; margin: .25rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.pb-my-asset { display: flex; gap: .6rem; align-items: flex-start; max-width: 100%; }
.pb-thumb { display: block; flex: 0 0 auto; }
.pb-thumb img {
    display: block; width: 104px; height: 104px; object-fit: cover;
    border: 1px solid rgba(0,0,0,.15); border-radius: .3rem; background: #fff;
}
.pb-thumb-file {
    width: 104px; height: 104px; display: grid; place-items: center; text-decoration: none;
    border: 1px dashed rgba(0,0,0,.3); border-radius: .3rem; background: #fff; color: #1e1e1e;
    font-size: .78rem; font-weight: 600; letter-spacing: .04em;
}
.pb-asset-meta { display: block; font-size: .8rem; min-width: 0; }
.pb-asset-name { display: block; word-break: break-word; }

/* ------------------------------------------------ business / family at checkout */
.pb-kind { border: 1px solid rgba(127,127,127,.35); border-radius: .4rem; padding: .6rem .8rem; margin: 0 0 1rem; }
.pb-kind legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.pb-kind-opt { display: flex; align-items: baseline; gap: .4rem; margin: .3rem 0; cursor: pointer; }
.pb-kind-opt small { opacity: .7; }

/* Present in every WordPress theme, but the portal must not depend on that. */
.pb-portal .screen-reader-text, .pb-account .screen-reader-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* ---- 0.11.0: status tallies as filters, the three text fields, book settings ---- */
/* The tally is now a button, so it states both colours like every other control. */
.pb-status-filter { display: block; width: 100%; border: 0; background: transparent; color: #222;
    padding: 0; font: inherit; cursor: pointer; text-align: center; }
.pb-tally:has(.pb-status-filter.is-on) { outline: 2px solid #2f5ea8; }
.pb-status-filter.is-on { color: #000; }

.pb-dedication h6 { margin: .5rem 0 .15rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; opacity: .65; }
.pb-dedication h6:first-child { margin-top: 0; }
.pb-print-text { font-weight: 500; }
.pb-instr { font-size: .82rem; padding: .3rem .45rem; border-left: 3px solid rgba(200,150,50,.6); background: rgba(200,150,50,.08); }
.pb-links { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.pb-links a { word-break: break-all; }
.pb-ded-form label { display: block; font-size: .72rem; margin-top: .35rem; }
.pb-ded-form textarea { display: block; width: 100%; box-sizing: border-box; font-size: .85rem; }
.pb-card-msg textarea { display: block; width: 100%; box-sizing: border-box; margin-bottom: .6rem; }
.pb-card-msg h4 { margin: .6rem 0 .2rem; }

.pb-settings { margin: 1rem 0; border: 1px solid rgba(127,127,127,.3); border-radius: .4rem; padding: .5rem .8rem; }
.pb-settings summary { cursor: pointer; font-weight: 600; }
.pb-settings fieldset { border: 0; margin: .8rem 0 0; padding: 0; }
.pb-settings legend { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-bottom: .3rem; }
.pb-settings label { display: block; margin: .4rem 0; font-size: .88rem; }
.pb-settings input[type="text"], .pb-settings input[type="email"], .pb-settings input[type="date"],
.pb-settings input[type="number"] { display: block; margin-top: .15rem; padding: .35rem; font-size: .9rem; max-width: 100%; box-sizing: border-box; }
.pb-settings input[type="text"], .pb-settings input[type="email"] { width: 28rem; }
.pb-settings small { display: block; font-size: .74rem; opacity: .7; }
.pb-settings .pb-check input { margin-right: .4rem; }
.pb-spec-table { border-collapse: collapse; font-size: .85rem; }
.pb-spec-table th, .pb-spec-table td { padding: .2rem .5rem .2rem 0; text-align: left; }
.pb-spec-table input { width: 5.5rem; margin: 0; }
.pb-spec-px { opacity: .7; white-space: nowrap; }
.pb-settings-save, .pb-storage-test { padding: .4rem .9rem; border: 1px solid #2f5ea8; border-radius: .3rem;
    background: #fff; color: #2f5ea8; cursor: pointer; font-size: .85rem; margin-right: .4rem; }
.pb-settings-save { background: #2f5ea8; color: #fff; }
.pb-settings-save:hover { background: #24457d; color: #fff; }
.pb-storage-test:hover { background: #f1f1f1; color: #000; }
.pb-storage-result { list-style: none; padding: 0; font-size: .85rem; }
.pb-storage-result .is-ok  { color: #2f7a4a; }
.pb-storage-result .is-bad { color: #b4472f; font-weight: 600; }
.pb-rem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 1rem; }
.pb-settings textarea { display: block; width: 100%; max-width: 40rem; box-sizing: border-box; font-size: .88rem; margin-top: .15rem; }
.pb-thankyou { margin: 1.5rem 0; }

/* 0.16 — read-back summary, edit toggle, visible upload progress */
.pb-summary { margin: 0 0 .75rem; }
.pb-summary dt { margin: .6rem 0 .15rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.pb-summary dd { margin: 0; white-space: normal; word-break: break-word; }
.pb-summary dd ul { margin: 0; padding-left: 1.1rem; }
.pb-edit { margin: .5rem 0; }
.pb-edit summary { cursor: pointer; font-weight: 600; padding: .4rem 0; }
.pb-pending { border: 2px solid #C09A5D; border-radius: .5rem; padding: .75rem; margin: .25rem 0 .75rem; background: rgba(192,154,93,.08); }
.pb-pending-head { margin: 0 0 .5rem; font-weight: 600; }
.pb-pending-list { list-style: none; margin: 0; padding: 0; }
.pb-pending-list li { display: grid; grid-template-columns: 1fr 5.5rem; gap: .2rem .5rem; align-items: center; margin: .35rem 0; font-size: .9rem; }
.pb-pending-list .pb-pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-pending-list .pb-ps { text-align: right; font-variant-numeric: tabular-nums; }
.pb-pending-list .pb-pbar { grid-column: 1 / -1; height: .4rem; background: rgba(127,127,127,.2); border-radius: .2rem; overflow: hidden; }
.pb-pending-list .pb-pbar i { display: block; height: 100%; width: 0; background: #C09A5D; transition: width .3s; }
.pb-pending-list li.pb-pdone .pb-ps { color: #2e7d32; }
.pb-pending-list li.pb-pfail .pb-ps { color: #b00020; grid-column: 1 / -1; text-align: left; }

/* Emails from the artwork mailbox */
.pb-mailtray { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid rgba(127,127,127,.3); border-radius: .4rem; }
.pb-mailtray h3 { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 .25rem; font-size: 1rem; }
.pb-held { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .75rem; }
.pb-held-mail { padding: .6rem .75rem; border-left: 3px solid #C09A5D; background: rgba(192,154,93,.08); }
.pb-held-mail header { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.pb-held-mail header time { opacity: .7; font-size: .85em; }
.pb-held-subject { margin: .2rem 0; font-weight: 600; }
.pb-held-files { margin: .25rem 0 .5rem; padding-left: 1.1rem; }
.pb-held-target { max-width: 100%; }
.pb-by-email { background: rgba(192,154,93,.25); }
.pb-received { margin-top: .75rem; }

/* Microsoft sign-in on the portal sign-in box */
.pb-ms-button{display:inline-block;background:#2f2f2f;color:#fff;text-decoration:none;padding:11px 18px;border-radius:4px;font-weight:600;margin:4px 0 2px}
.pb-ms-button:hover{background:#1a1a1a;color:#fff}
.pb-signin-sep{color:#888;font-size:13px;margin:14px 0 6px}
.pb-signin-error{background:#fdecea;color:#8a1c1c;padding:10px 14px;border-radius:6px;margin:0 0 12px;font-size:14px}

.pb-check-wording { display: inline-block; font-size: .75rem; padding: .1rem .4rem; border-radius: .3rem; background: rgba(230,160,0,.18); margin-bottom: .2rem; }
