/* ######## 12/01/2026 - Steve - #2726 r1 (Bob / Jeff): the RAP header stays on ONE line with the Cart link (measured in Playwright
   with a cart count shown, member + guest header): 1280 / 1366 / 1440 (Contact wrapped to a 2nd line), 920 - 1024 (same fix
   covers it) and 390 (the menu button wrapped under the logo once the count showed). Cart = icon + count (the word only for
   screen readers via its aria-label), smaller My account / Register / Sign in pills, tighter menu gaps; narrower screens a
   step smaller. */
/* ######## 12/01/2026 - Steve - #2726: All Books cards with price + Add to cart / Buy on <channel>, the header Cart link + count,
   the "Added to cart - View cart / Keep shopping" notice (rap_cart_add.js). */
/* ######## 11/20/2026 - Steve - #2640 NEW: RAP store look. Linked ONLY on the RAP website (the RAP pages and the RAP website's
   Odoo pages: cart, checkout, payment, confirmation), so the TSI and FMM shops are untouched. Colours = the RAP variables
   (tsi_rap_website rap.css: cream / dark green / copper). */

/* ---- Add to cart (book page, tiles, category rows) ---- */
.rap-buy{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 4px}
.rap-buy-form{margin:0}
.rap-buy-btn{cursor:pointer;display:inline-flex;flex-direction:column;align-items:flex-start;line-height:1.2;text-align:left;
  font-family:var(--rap-body-font);font-size:16px}
.rap-buy-btn .rap-buy-label{font-weight:700}
.rap-buy-btn .rap-buy-what{font-size:14px;opacity:.95}
.rap-buy-btn.small{font-size:14px}
.rap-buy-btn.small .rap-buy-what{font-size:13px}
.rap-buy-block{margin-top:18px;padding-top:12px;border-top:1px solid var(--rap-line)}
.rap-buy-head{font-size:24px!important;margin:0 0 6px!important}
.rap-store-msg{background:#fff4e5;border:1px solid var(--rap-copper);color:var(--rap-ink);border-radius:8px;padding:10px 14px;
  margin:12px 0;font-weight:600}
/* a tile with Add to cart is a div: the cover / text link fills it, the buttons sit under the text */
.rap-htile.rap-htile-shop{display:block}
.rap-htile-shop .rap-htile-link{display:grid;grid-template-columns:120px 1fr;gap:16px;align-items:start;text-decoration:none;color:inherit}
.rap-grid3 .rap-htile-shop .rap-htile-link{grid-template-columns:1fr;justify-items:center;text-align:center}
.rap-grid3 .rap-htile-shop .rap-buy{justify-content:center}
.rap-strip-cell{display:flex;flex-direction:column}
.rap-strip-cell .rap-strip-link{display:block;text-decoration:none;color:inherit}
.rap-buy-strip{margin-top:6px;gap:6px}
.rap-buy-strip .rap-buy-btn{padding:6px 10px}
@media (max-width:600px){
  .rap-buy{gap:8px}
  .rap-buy-form,.rap-buy-btn{width:100%}
  .rap-buy-ext{width:100%}   /* Steve 12/01/2026 #2726: Buy on <channel> as wide as Add to cart on a phone */
  .rap-htile-shop .rap-htile-link{grid-template-columns:96px 1fr;gap:12px}
}

/* ---- the RAP website's Odoo shop pages (cart / checkout / payment / confirmation) ---- */
body:has(#rap-shell-head) #wrap{background:var(--rap-cream);color:var(--rap-ink);font-family:var(--rap-body-font)}
body:has(#rap-shell-head) #wrap h1,body:has(#rap-shell-head) #wrap h2,body:has(#rap-shell-head) #wrap h3,
body:has(#rap-shell-head) #wrap h4,body:has(#rap-shell-head) #wrap h5{font-family:var(--rap-head-font);color:var(--rap-green)}
body:has(#rap-shell-head) #wrap a{color:var(--rap-green)}
body:has(#rap-shell-head) #wrap .btn-primary,body:has(#rap-shell-head) #wrap .btn-primary:hover,
body:has(#rap-shell-head) #wrap .btn-primary:focus,body:has(#rap-shell-head) #wrap .btn-primary:disabled{
  background-color:var(--rap-green)!important;border-color:var(--rap-green)!important;color:#fff!important}
body:has(#rap-shell-head) #wrap .btn-secondary,body:has(#rap-shell-head) #wrap .btn-light{
  background-color:var(--rap-paper)!important;border-color:var(--rap-line)!important;color:var(--rap-green)!important}
body:has(#rap-shell-head) #wrap .text-primary{color:var(--rap-green)!important}
body:has(#rap-shell-head) #wrap .bg-primary,body:has(#rap-shell-head) #wrap .progress-bar{background-color:var(--rap-green)!important}
body:has(#rap-shell-head) #wrap .form-check-input:checked{background-color:var(--rap-green);border-color:var(--rap-green)}
body:has(#rap-shell-head) #wrap .card,body:has(#rap-shell-head) #wrap .list-group-item{background:var(--rap-paper);border-color:var(--rap-line)}
body:has(#rap-shell-head) .rap-store-library{background:#eef4ee;border-color:var(--rap-green);color:var(--rap-ink)}
body:has(#rap-shell-head) .rap-store-test-note{background:#fff4e5;border-color:var(--rap-copper);color:var(--rap-ink)}
body:has(#rap-shell-head) #wrap .btn-outline-danger,body:has(#rap-shell-head) #wrap .js_delete_product{
  color:var(--rap-copper)!important;border-color:var(--rap-copper)!important;background:transparent!important}
body:has(#rap-shell-head) #wrap .btn-outline-danger:hover{background:var(--rap-copper)!important;color:#fff!important}
/* the TSI store's carrier badges (UPS / FedEx / USPS, tsi_shipping_website) are not RAP's shipping */
body:has(#rap-shell-head) .tsi_ship_badges{display:none!important}
/* r2 (Otis): an owned e-book - "In your library" instead of Add to cart */
.rap-buy-owned{display:inline-flex;flex-direction:column;align-items:flex-start;line-height:1.2;text-decoration:none!important;
  border-color:var(--rap-green)!important;color:var(--rap-green)!important}
.rap-buy-owned .rap-buy-label{font-weight:700}
.rap-buy-owned .rap-buy-what{font-size:13px}

/* ---- #2726: Buy on <channel> (third party, new tab) ---- */
.rap-buy-ext{display:inline-flex;flex-direction:column;align-items:flex-start;line-height:1.2;text-align:left;text-decoration:none!important;
  background:#fff!important;border:2px solid var(--rap-green)!important;color:var(--rap-green)!important}
.rap-buy-ext .rap-buy-label{font-weight:700}
.rap-buy-ext .rap-buy-what{font-size:13px}
.rap-buy-ext:hover{background:var(--rap-paper)!important}
.rap-buy-btn.is-busy{opacity:.7;cursor:progress}

/* ---- #2726: All Books card with buttons (a div; the cover / title link inside, the buttons under it) ---- */
.rap-cc-grid > .rap-cc.rap-cc-shop{justify-content:flex-start}
.rap-cc-shop .rap-cc-link{display:flex;flex-direction:column;align-items:center;width:100%;text-decoration:none;color:inherit}
.rap-cc-shop .rap-cc-link:hover .rap-cc-cover img{box-shadow:0 10px 24px rgba(36,69,46,.28)}
.rap-buy-cc{flex-direction:column;align-items:stretch;width:100%;gap:6px;margin-top:8px}
.rap-buy-cc .rap-buy-form{width:100%}
.rap-buy-cc .rap-buy-btn,.rap-buy-cc .rap-buy-ext,.rap-buy-cc .rap-buy-owned{width:100%;align-items:center;text-align:center;padding:6px 8px;
  white-space:normal;overflow-wrap:anywhere}

/* ---- #2726: header Cart link + count ---- */
.rap-cart-link{display:inline-flex;align-items:center;gap:6px;color:#fff!important;text-decoration:none!important;font-weight:600;
  padding:6px 8px;border-radius:8px;flex:0 0 auto;position:relative}
.rap-cart-link:hover,.rap-cart-link:focus-visible{background:rgba(255,255,255,.12)}
.rap-cart-count{min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--rap-copper);color:#fff;font-size:13px;
  font-weight:700;display:inline-flex;align-items:center;justify-content:center;line-height:1}
.rap-cart-count[hidden]{display:none}
@media (max-width:900px){
  .rap-cart-link{order:1;margin-left:auto}
  .rap-burger{order:2;margin-left:0}
  .rap-drawer{order:3}
}
/* @media (max-width:420px){.rap-cart-word{display:none}}   Steve 12/01/2026 #2726 r1: hidden at every width now (below) */

/* ---- #2726: "Added to cart" notice (fixed, bottom) ---- */
.rap-cart-notice{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:1050;width:min(560px,calc(100vw - 32px));
  box-sizing:border-box;background:#fff;border:2px solid var(--rap-green);border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.25);
  padding:12px 14px;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;font-family:var(--rap-body-font);color:var(--rap-ink)}
.rap-cart-notice[hidden]{display:none}
.rap-cart-notice.is-error{border-color:var(--rap-copper);background:#fff4e5}
.rap-cart-notice-msg{margin:0;flex:1 1 220px;font-weight:600;overflow-wrap:anywhere}
.rap-cart-notice-acts{display:flex;gap:8px;flex:0 0 auto}
.rap-cart-notice .rap-btn{cursor:pointer;text-decoration:none!important}
.rap-cart-notice .rap-btn[hidden]{display:none}

/* ---- #2726 r1: header on one line (see the top note; numbers measured in Playwright) ---- */
.rap-head .rap-bar{gap:14px}
.rap-head .rap-nav ul{gap:4px 14px}
.rap-head .rap-actions .rap-btn{padding:7px 13px;font-size:15px;margin:0}
.rap-cart-link{padding:6px;gap:4px}
.rap-cart-word{display:none}
@media (min-width:901px) and (max-width:1100px){
  .rap-head .rap-bar{gap:10px}
  .rap-head .rap-nav ul{gap:4px 10px}
  .rap-head .rap-nav a{font-size:15px}
  .rap .rap-head .rap-word{font-size:23px}
  .rap .rap-head .rap-logo{height:51px}
  .rap-head .rap-actions .rap-btn{padding:6px 10px;font-size:14px}
}
@media (min-width:901px) and (max-width:990px){
  .rap-head .rap-bar{gap:8px}
  .rap-head .rap-nav ul{gap:4px 8px}
  .rap-head .rap-nav a{font-size:14px}
  .rap .rap-head .rap-word{font-size:21px}
  .rap .rap-head .rap-logo{height:46px}
  .rap-head .rap-actions{gap:4px}
  .rap-head .rap-actions .rap-btn{padding:5px 9px;font-size:13px}
}
@media (max-width:900px){
  .rap-head .rap-bar{gap:8px}
  .rap-cart-link{padding:4px}
  .rap-head .rap-burger{padding:6px 4px}
}
@media (max-width:420px){
  .rap .rap-head .rap-word{font-size:22px}
  .rap .rap-head .rap-logo{height:49px}
}
@media (max-width:370px){
  .rap .rap-head .rap-word{font-size:19px}
  .rap .rap-head .rap-logo{height:44px}
}
