/* EL-R20b 2026-10-02: phone/tablet touch fixes. Every rule sits inside @media (max-width: 1023px), so desktop
   (and R19/R21 desktop CSS) is untouched. Loaded from EncoreLuxe_Checkout/layout/default.xml in the theme.
   Rollback: delete that layout file (or this file's numbered block) and flush caches. */

@media (max-width: 1023px) {
  /* 5a. Radios and checkboxes: 26px hit area, same drawn size (a transparent ::after extends the target). */
  :where(input[type="checkbox"].form-checkbox, input[type="radio"].form-radio) {
    position: relative;
  }
  :where(input[type="checkbox"].form-checkbox, input[type="radio"].form-radio)::after {
    content: "";
    position: absolute;
    inset: -4px;
  }
  /* 5b. Small stand-alone text links: taller hit area without moving the text (padding on an inline box). */
  .el-chk-signin a,
  .el-r9-reassure a,
  .el-r9-help a,
  .el-bag-help a,
  .el-price-trust-link a,
  a.el-auth-plate__link,
  .checkout-cart-index li > span > a {
    padding-block: 4px;
  }
  /* 5c. Message close button: 26px target, same 18px icon. */
  #messages .message button {
    padding: 4px;
    margin: -4px;
  }
}

@media (max-width: 767px) {
  /* 8. Compact cookie bar: same wording, links and two buttons, about 130px tall at 390px instead of 325px.
     The copy scrolls inside the bar (with a soft fade) so nothing is cut. */
  #el-cookie-bar .el-cookie-bar__inner {
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    gap: 0.55rem;
  }
  #el-cookie-bar .el-cookie-bar__copy {
    flex: 1 1 100%;
    font-size: 0.78rem;
    line-height: 1.5;
    max-height: 4.1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.45rem;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 0.7rem), rgba(0, 0, 0, 0.3));
    mask-image: linear-gradient(to bottom, #000 calc(100% - 0.7rem), rgba(0, 0, 0, 0.3));
  }
  #el-cookie-bar .el-cookie-bar__title {
    display: inline;
    margin: 0 0.4rem 0 0;
    font-size: 0.95rem;
    line-height: 1.2;
  }
  #el-cookie-bar .el-cookie-bar__text {
    display: inline;
    font-size: 0.78rem;
    line-height: 1.5;
  }
  #el-cookie-bar .el-cookie-bar__actions {
    gap: 0.5rem;
  }
  #el-cookie-bar .el-cookie-btn {
    min-height: 2.75rem;
    padding: 0.55rem 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
  }
}

/* 2. Checkout "Your session expired" message (EncoreLuxe_Checkout::el-checkout-r20b.phtml). All widths; new class only. */
.el-r20b-expired {
  position: sticky;
  top: 0.5rem;
  z-index: 45;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  background: var(--cream, #fbf9f6);
  color: var(--ink, #18151a);
  border: 1px solid var(--ink, #18151a);
  box-shadow: 0 10px 30px rgba(24, 21, 26, 0.18);
}
.el-r20b-expired p { margin: 0 0 0.35rem; font-size: 0.9rem; line-height: 1.45; }
.el-r20b-expired .el-r20b-expired__title { font-weight: 700; font-size: 1rem; }
.el-r20b-expired__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.65rem; }
.el-r20b-expired__actions button {
  min-height: 2.75rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ink, #18151a);
  cursor: pointer;
}
.el-r20b-expired__primary { background: var(--ink, #18151a); color: var(--cream, #fbf9f6); }
.el-r20b-expired__secondary { background: transparent; color: var(--ink, #18151a); }
.el-r20b-expired__primary[disabled] { opacity: 0.7; cursor: progress; }
.el-r20b-expired__note a { text-decoration: underline; }

/* (a) 404 page (CMS page "no-route" for stores 1-2, page_id 28). All widths; new classes only. */
.el-404 { max-width: 36rem; margin: 0 0 3rem; }
.el-404__lead { font-size: 1.0625rem; line-height: 1.55; margin: 0 0 1.5rem; }
.el-404__search label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 0.4rem; }
.el-404__field { display: flex; gap: 0.5rem; }
.el-404__field input { flex: 1 1 auto; min-width: 0; min-height: 3rem; }
.el-404__field button { min-height: 3rem; padding: 0 1.25rem; }
.el-404__label { margin: 1.75rem 0 0.6rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(24, 21, 26, 0.7); }
.el-404__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.el-404__links a { display: flex; align-items: center; justify-content: space-between; min-height: 3rem; padding: 0 1rem; border: 1px solid rgba(24, 21, 26, 0.18); background: #fbf9f6; color: #18151a; text-decoration: none; font-weight: 600; }
.el-404__links a::after { content: "\2192"; color: #8c6a4f; }
.el-404__links a:hover { border-color: #18151a; }
@media (min-width: 768px) { .el-404__links { grid-template-columns: repeat(4, minmax(0, 1fr)); } .el-404 { max-width: 44rem; } }
