/* Our additions to the current site's frame: the Cart item, the phone cart button, the cart drawer and the
   button style shared with the GripBar page. Colours are the current site's (navy #0d3a57, red #be1d2c). */
:root {
  --navy: #0d3a57;
  --red: #be1d2c;
  --white: #ffffff;
  --line: #bfc4cc;
  --muted: #6b7380;
}

/* Phones: a cart button beside the phone button in the builder's top bar. */
#header a.mobile-menu-cart { display: none; }
@media (max-width: 991px) {
  #header a.mobile-menu-cart {
    display: block;
    position: absolute;
    top: 10px;
    right: 58px;
    height: 40px;
    min-width: 40px;
    padding: 8px 8px 0;
    background-color: #333;
    color: #fff;
    font-size: 18px;
    border: 1px solid #666;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
  }
  #header a.mobile-menu-cart span { font-size: 13px; margin-left: 4px; }
}

/* Buttons: the current site's red pill. */
.gb-btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  border: 0;
  border-radius: 500px;
  padding: 10px 18px;
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  line-height: 24px;
  text-decoration: none;
  cursor: pointer;
}
.gb-btn:hover, .gb-btn:focus { color: var(--white); filter: brightness(1.1); text-decoration: none; }
.gb-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.gb-btn-block { display: block; width: 100%; text-align: center; }
.gb-btn[aria-busy="true"] { position: relative; overflow: hidden; }
.gb-btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  left: -40%;
  bottom: 0;
  width: 40%;
  height: 3px;
  background: var(--white);
  animation: gb-busy 1s ease-in-out infinite;
}
@keyframes gb-busy { to { left: 100%; } }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.field-error { color: var(--red); font-size: 14px; margin: 4px 0 0; }

/* Cart drawer. */
.cart[hidden] { display: none; }
.cart { position: fixed; inset: 0; z-index: 10000; font-family: "Montserrat", sans-serif; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100%;
  background: var(--white);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #444;
}
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cart-head h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--navy); text-transform: none; }
.cart-close { background: none; border: 0; font-weight: 700; font-size: 13px; color: var(--navy); cursor: pointer; }
.cart-line { display: flex; gap: 14px; border: 1px solid var(--line); padding: 12px; }
.cart-thumb { width: 90px; height: 90px; flex: none; background: #e3e5eb; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.cart-line-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-line-title { font-weight: 700; font-size: 15px; color: var(--navy); margin: 0; }
.cart-line-variant { font-size: 12px; margin: 0; }
.cart-line-qty { display: flex; gap: 6px; }
.qty-box {
  width: 46px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--navy);
  border-radius: 4px;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.cart-line .link-btn { align-self: flex-start; font-size: 12px; font-weight: 400; }
.cart-subtotal { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; color: var(--navy); }
.cart-note { font-size: 12px; margin: 0; }
.cart-empty { margin: 0; }
.cart-continue { align-self: flex-start; }
.cart-error { color: var(--red); font-size: 14px; }
