/* PilotTrain Book Shipping: what customers see (.ptbs). Markup from includes/render.php.
   Four pieces: a card (printed to order, the holiday notice, the pilot shops), the pilot
   shop buttons, the list of postage facts, and the wrapper that places them on a book page
   (.ptbs--before, .ptbs--after) or across a list of books, the cart or the checkout.
   Nothing moves. Every colour pair passes 4.5 to 1. */

.ptbs, .ptbs *, .ptbs *::before, .ptbs *::after{box-sizing:border-box;}
.ptbs{
  --ptbs-ink:#0a1a2b; --ptbs-text:#3d4c60; --ptbs-muted:#586779; --ptbs-line:#dbe4ee; --ptbs-card:#fff;
  --ptbs-blue:#1f5fcc; --ptbs-blue-bg:#eef5ff; --ptbs-blue-line:#cbdcf8; --ptbs-blue-ico:#dce9ff;
  --ptbs-amber:#8a5200; --ptbs-amber-bg:#fff8e9; --ptbs-amber-line:#efd7a0; --ptbs-amber-ico:#fde9be;
  display:grid; gap:10px; margin:0 0 18px; padding:0;
  font-size:14.5px; line-height:1.5; color:var(--ptbs-text); text-align:left;
}
.ptbs p, .ptbs ul, .ptbs li, .ptbs strong, .ptbs b{margin:0; padding:0;}
.ptbs ul, .ptbs li{list-style:none;}
.ptbs svg{display:block; flex:none;}
.ptbs a:focus-visible{outline:3px solid #5d8ce6; outline-offset:3px; border-radius:10px;}
.ptbs .screen-reader-text{position:absolute !important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;}

/* ---------- a card ---------- */
.ptbs .ptbs-card{
  display:flex; align-items:flex-start; gap:12px; padding:14px 16px;
  border:1px solid var(--ptbs-line); border-radius:14px; background:var(--ptbs-card);
}
.ptbs .ptbs-ico{display:grid; place-items:center; flex:none; width:38px; height:38px; border-radius:10px;}
.ptbs .ptbs-ico svg{width:20px; height:20px;}
.ptbs .ptbs-card-t{flex:1; min-width:0;}
.ptbs .ptbs-card strong{display:block; font-size:15.5px; font-weight:700; letter-spacing:-.01em; line-height:1.3; color:var(--ptbs-ink);}
.ptbs .ptbs-card p{font-size:14.5px; line-height:1.5; color:var(--ptbs-text);}
.ptbs .ptbs-card strong + p{margin-top:3px;}

/* printed to order */
.ptbs .ptbs-card--pod{border-color:var(--ptbs-blue-line); background:var(--ptbs-blue-bg);}
.ptbs .ptbs-card--pod .ptbs-ico{color:var(--ptbs-blue); background:var(--ptbs-blue-ico);}

/* the holiday notice */
.ptbs .ptbs-card--notice{border-color:var(--ptbs-amber-line); background:var(--ptbs-amber-bg);}
.ptbs .ptbs-card--notice .ptbs-ico{color:var(--ptbs-amber); background:var(--ptbs-amber-ico);}
.ptbs .ptbs-card--notice p{color:#4d3a12;}

/* ---------- the pilot shops ---------- */
.ptbs .ptbs-card--shops{display:block; padding:16px;}
.ptbs .ptbs-card--shops strong{font-size:17px; letter-spacing:-.015em;}
.ptbs ul.ptbs-shops{display:grid; gap:8px; margin-top:12px;}
.ptbs a.ptbs-shop, .ptbs a.ptbs-shop:visited{
  display:flex; align-items:center; gap:12px; min-height:58px; padding:9px 14px 9px 12px;
  border-radius:12px; background:var(--ptbs-ink); color:#fff; text-decoration:none;
  transition:background .16s ease, transform .16s ease;
}
.ptbs a.ptbs-shop:hover, .ptbs a.ptbs-shop:focus{background:#12304f; color:#fff; transform:translateY(-1px);}
.ptbs .ptbs-shop-pin{display:grid; place-items:center; width:34px; height:34px; border-radius:9px; color:#a9c8f5; background:rgba(255,255,255,.1);}
.ptbs .ptbs-shop-pin svg{width:18px; height:18px;}
.ptbs .ptbs-shop-t{flex:1; min-width:0; display:block;}
.ptbs .ptbs-shop-t b{display:block; font-size:15.5px; font-weight:700; line-height:1.25; color:#fff;}
.ptbs .ptbs-shop-t span{display:block; margin-top:1px; font-size:13.5px; font-weight:500; line-height:1.3; color:#b9cbe0;}
.ptbs .ptbs-shop-go{color:#a9c8f5;}
.ptbs .ptbs-shop-go svg{width:17px; height:17px;}
.ptbs p.ptbs-small{margin-top:10px; font-size:13.5px; color:var(--ptbs-muted);}
.ptbs a.ptbs-ask, .ptbs a.ptbs-ask:visited{
  display:inline-flex; align-items:center; gap:8px; min-height:46px; margin-top:12px; padding:0 18px;
  border-radius:12px; background:var(--ptbs-ink); color:#fff; font-size:15px; font-weight:700; text-decoration:none;
  transition:background .16s ease;
}
.ptbs a.ptbs-ask:hover, .ptbs a.ptbs-ask:focus{background:#12304f; color:#fff;}
.ptbs a.ptbs-ask svg{width:16px; height:16px;}

/* ---------- postage ---------- */
.ptbs .ptbs-post{padding:14px 16px; border:1px solid var(--ptbs-line); border-radius:14px; background:var(--ptbs-card);}
.ptbs p.ptbs-post-h{margin-bottom:9px; font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; line-height:1.3; color:var(--ptbs-muted);}
.ptbs ul.ptbs-facts{display:grid; gap:8px;}
.ptbs ul.ptbs-facts li{display:flex; align-items:flex-start; gap:10px; font-size:14px; line-height:1.45; color:var(--ptbs-text);}
.ptbs ul.ptbs-facts svg{width:17px; height:17px; margin-top:2px; color:#15803d;}
.ptbs ul.ptbs-facts a, .ptbs ul.ptbs-facts a:visited{font-weight:700; color:var(--ptbs-blue); white-space:nowrap; text-decoration:underline; text-decoration-thickness:1.5px; text-underline-offset:3px;}
.ptbs ul.ptbs-facts a:hover{color:#184fae;}

/* ---------- on a book page ---------- */
.ptbs.ptbs--before{margin:0 0 18px;}
.ptbs.ptbs--after{margin:0 0 20px;}
/* while orders are paused the pay-later line under the price has nothing to pay for */
body.ptbs-paused .wc-stripe-bnpl-product-message{display:none !important;}

/* ---------- across a list of books, the cart, the top of the checkout ---------- */
.ptbs.ptbs--list, .ptbs.ptbs--cart, .ptbs.ptbs--checkout{margin:0 0 22px;}
.ptbs.ptbs--list{margin-top:6px;}
/* under the checkout's shipping options */
.ptbs.ptbs--postage{margin:0 0 24px;}

@media (min-width:700px){
  .ptbs.ptbs--list .ptbs-card, .ptbs.ptbs--cart .ptbs-card, .ptbs.ptbs--checkout .ptbs-card{padding:16px 20px; gap:14px;}
  .ptbs.ptbs--list ul.ptbs-shops, .ptbs.ptbs--cart ul.ptbs-shops, .ptbs.ptbs--checkout ul.ptbs-shops{grid-template-columns:repeat(2,minmax(0,1fr)); max-width:640px;}
  .ptbs.ptbs--all ul.ptbs-facts{grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 22px;}
}

/* ---------- a phone: the drawing sits beside the heading and the words run the full width ---------- */
@media (max-width:520px){
  .ptbs .ptbs-card{display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:8px 10px; padding:13px 14px;}
  .ptbs .ptbs-card-t{display:contents;}
  .ptbs .ptbs-ico{width:32px; height:32px; border-radius:9px;}
  .ptbs .ptbs-ico svg{width:17px; height:17px;}
  .ptbs .ptbs-card strong{align-self:center;}
  .ptbs .ptbs-card p{grid-column:1 / -1;}
  .ptbs .ptbs-card strong + p{margin-top:0;}
  /* a notice with no heading keeps its words beside the drawing */
  .ptbs .ptbs-card-t > p:first-child{grid-column:2; padding-top:5px;}
  .ptbs .ptbs-card--shops{display:block; padding:14px;}
  .ptbs .ptbs-card--shops .ptbs-card-t{display:block;}
  .ptbs .ptbs-card--shops strong + p{margin-top:3px;}
  /* in the narrow column of a book page the shop's name gets the room */
  .ptbs.ptbs--before .ptbs-shop-pin{display:none;}
  .ptbs.ptbs--before a.ptbs-shop{padding-left:14px;}
  .ptbs .ptbs-post{padding:13px 14px;}
}

@media (prefers-reduced-motion:reduce){
  .ptbs *, .ptbs *::before, .ptbs *::after{transition:none !important;}
}
