/* ==========================================================================
   GetPayslip — the quick-enquiry pop-up.

   Kept in its own file rather than appended to styles.css so that a change to
   the box cannot reflow the shop, and so the widget can be dropped on the
   WordPress side later without dragging 44 KB of storefront with it. Loaded by
   every page that loads styles.css.

   Everything is scoped under .enq. The only global writes are on <body> while
   the box is open, and they are put back by the script.
   ========================================================================== */

.enq {
  position: fixed;
  inset: 0;
  z-index: 120;              /* above .modal (100): an enquiry can be opened
                                from the checkout modal's backdrop */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.enq.is-open { display: flex; }

.enq__scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 42, 67, .5);
  backdrop-filter: blur(3px);
  animation: enqFade .2s ease-out;
}
@keyframes enqFade { from { opacity: 0; } }

.enq__box {
  position: relative;
  width: min(560px, 100%);
  margin: auto;
  background: var(--paper, #fff);
  border-radius: 20px;
  box-shadow: 0 30px 70px -16px rgba(15, 42, 67, .38);
  padding: 26px 28px 22px;
  animation: enqPop .22s cubic-bezier(.2, .9, .3, 1);
}
@keyframes enqPop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
}

.enq__x {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--ink, #5b6b7c);
  font-size: 15px; line-height: 1;
  cursor: pointer;
}
.enq__x:hover { background: var(--wash, #f4f8fd); color: var(--navy, #0f2a43); }
.enq__x:focus-visible { outline: 2px solid var(--blue, #1d5fd1); outline-offset: 2px; }

.enq__head { padding-right: 26px; }
.enq__kicker {
  display: inline-block;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--teal, #19b394);
  margin-bottom: 8px;
}
.enq__title {
  margin: 0;
  font-size: 23px; line-height: 1.2;
  font-weight: 800; letter-spacing: -.02em;
  color: var(--navy, #0f2a43);
}
.enq__sub {
  margin: 8px 0 0;
  font-size: 14.5px; line-height: 1.5;
  color: var(--ink, #5b6b7c);
}

/* ---- the one choice that tells staff what this is ------------------------ */
.enq__kind {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 16px;
}
.enq__opt {
  position: relative;
  display: block;
  padding: 11px 13px 12px;
  border: 1.5px solid var(--line, #dce6f2);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.enq__opt:hover { border-color: #c3d3e6; background: var(--wash, #f4f8fd); }
.enq__opt input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.enq__opt-t {
  display: block;
  font-size: 14px; font-weight: 700;
  color: var(--navy, #0f2a43);
  padding-left: 22px;
}
.enq__opt-t::before {
  content: "";
  position: absolute;
  left: 13px; top: 14px;
  width: 13px; height: 13px;
  border: 1.5px solid #b9c8da;
  border-radius: 50%;
  background: #fff;
}
.enq__opt.is-on {
  border-color: var(--blue, #1d5fd1);
  background: var(--blue-wash, #eaf1fd);
  box-shadow: 0 0 0 3px rgba(29, 95, 209, .1);
}
.enq__opt.is-on .enq__opt-t::before {
  border-color: var(--blue, #1d5fd1);
  box-shadow: inset 0 0 0 3.5px var(--blue, #1d5fd1);
}
.enq__opt-d {
  display: block;
  margin-top: 3px;
  padding-left: 22px;
  font-size: 12px; line-height: 1.35;
  color: var(--ink, #5b6b7c);
}
.enq__opt input:focus-visible ~ .enq__opt-t::before {
  outline: 2px solid var(--blue, #1d5fd1);
  outline-offset: 2px;
}

/* ---- fields -------------------------------------------------------------- */
/* .field styles are reused from styles.css; only the gap and the textarea
   reset are set here, because the storefront never had a textarea. */
.enq__grid { display: grid; gap: 12px; }
.enq__grid .field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--navy, #0f2a43);
  background: #fff;
  border: 1.5px solid var(--line, #dce6f2);
  border-radius: 11px;
  padding: 11px 13px;
  resize: vertical;
  min-height: 74px;
}
.enq__grid .field textarea::placeholder { color: #a9b7c6; }
.enq__grid .field textarea:focus {
  outline: none;
  border-color: var(--blue, #1d5fd1);
  box-shadow: 0 0 0 3px rgba(29, 95, 209, .14);
}
.enq__grid .field textarea[aria-invalid="true"] {
  border-color: #dc2626;
  background: #fef7f7;
}
/* styles.css only reveals .err for inputs; a textarea needs the same rule or
   the surname-less visitor sees a red box with no explanation */
.enq__grid .field textarea[aria-invalid="true"] ~ .err { display: block; }
.enq__grid .field .err { display: none; }

/* the honeypot: off-screen rather than display:none, because some bots skip
   hidden inputs and this field must look fillable to a naive scraper */
.enq__pot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.enq__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}
.enq__send { flex: 0 0 auto; }
.enq__no {
  border: 0;
  background: none;
  padding: 8px 2px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #5b6b7c);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #c9d6e6;
}
.enq__no:hover { color: var(--navy, #0f2a43); }

.enq__fine {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #8b9aab;
}
.enq__err {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
}

/* ---- sent --------------------------------------------------------------- */
.enq__done { text-align: center; padding: 6px 4px 0; }
.enq__done .enq__sub { max-width: 400px; margin: 10px auto 0; }
.enq__done .enq__sub a { color: var(--blue, #1d5fd1); font-weight: 600; }
.enq__done .btn { margin-top: 18px; }
.enq__tick {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--teal-wash, #e7f8f4);
  color: #0d8a71;
  font-size: 22px; font-weight: 800;
}
#enqRef {
  font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace);
  color: var(--navy, #0f2a43);
  letter-spacing: .01em;
}

/* ---- small screens ------------------------------------------------------ */
/* At 390px the two choices stack: side by side they leave ~150px each, which
   breaks "Just an enquiry" onto three lines and the descriptions onto four. */
@media (max-width: 520px) {
  .enq { padding: 0; align-items: flex-end; }
  .enq__box {
    width: 100%;
    max-height: 94vh;
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
    padding: 22px 18px 18px;
    animation: enqUp .24s cubic-bezier(.2, .9, .3, 1);
  }
  @keyframes enqUp { from { transform: translateY(100%); } }
  .enq__kind { grid-template-columns: 1fr; gap: 8px; }
  .enq__title { font-size: 21px; }
  /* The foot is the last thing in a scrolling sheet: from 390x800 the send
     button measured 100px below the fold, so the one action the box exists
     for needed a scroll to reach. Pinning it to the bottom of the sheet and
     letting the fields scroll above it keeps it always tappable. */
  .enq__form { display: flex; flex-direction: column; }
  .enq__foot {
    position: sticky;
    bottom: -18px;                 /* cancels the sheet's own padding */
    margin: 14px -18px -18px;
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px));
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 6px;
    background: linear-gradient(to bottom, rgba(255,255,255,.86), #fff 38%);
    border-top: 1px solid var(--line-soft, #eaf0f7);
  }
  .enq__send { width: 100%; }
  .enq__no { text-align: center; }
  .enq__fine { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .enq__scrim, .enq__box { animation: none; }
}

/* The box is a dialog: a visitor who has asked their operating system for
   less motion gets no animation, and nothing here changes layout on hover. */
