/* The general enquiry panel in the consultation section of the home page.

   The section behind it is oxblood with ivory text, so the panel is an ivory
   card on top of it, the same inversion the ivory button already uses. Colors
   are the brand tokens from r8-brand.css rather than new ones, and the type
   scale matches the rest of the page: Georgia for the heading, the body sans
   for everything else, 10px letterspaced uppercase for labels like .eyebrow.

   Everything is scoped under .r8-enquiry so no existing selector can be
   affected, which matters because .consultation and .consultation-panel
   already carry rules from four stylesheets. */

.r8-enquiry{
  background:var(--r8-ivory, #f7f2e8);
  color:var(--r8-dark, #31080f);
  max-width:650px;
  margin-top:38px;
  padding:34px 32px 30px;
}

.r8-enquiry :is(h1,h3){
  font:400 27px/1.15 Georgia,'Times New Roman',serif;
  letter-spacing:-.6px;
  margin:0 0 10px;
  color:var(--r8-dark, #31080f);
}

.r8-enquiry-guidance {
  display: grid;
  gap: .7rem;
  margin-block: 1rem 1.5rem;
  max-inline-size: 62ch;
  color: var(--r8-ink-muted, #65534e);
  font-size: .875rem;
  line-height: 1.6;
}

:is(.consultation, .inquiry-page) .r8-enquiry .r8-enquiry-guidance > p {
  margin: 0;
  color: inherit;
  font: inherit;
}

.r8-enquiry-contact {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
}

.r8-enquiry-contact a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
}

.r8-enquiry-field{ margin-bottom:20px; }

.r8-enquiry-field label{
  display:block;
  font-size:.875rem;
  font-weight:600;
  line-height:1.4;
  color:var(--r8-oxblood, #5a0f1b);
}

.r8-enquiry-hint{
  display:block;
  font-size:12px;
  line-height:1.5;
  color:var(--r8-ink-muted, #65534e);
  margin:5px 0 7px;
}

/* A ruled line rather than a boxed input, so the panel reads as stationery
   rather than as a web form. The 16px minimum stops iOS zooming on focus. */
.r8-enquiry-field input,
.r8-enquiry-field select,
.r8-enquiry-field textarea{
  width:100%;
  box-sizing:border-box;
  min-height:44px;
  padding:10px 2px;
  font:16px/1.5 Arial,Helvetica,sans-serif;
  color:var(--r8-dark, #31080f);
  background:transparent;
  border:0;
  border-bottom:2px solid var(--r8-line-dark, #5c829c);
  border-radius:0;
  transition:border-color .2s;
}

.r8-enquiry-field textarea{ resize:vertical; line-height:1.7; }

.r8-enquiry-field select{
  appearance:none;
  -webkit-appearance:none;
  padding-right:24px;
  /* The chevron is drawn rather than loaded, so it needs no image request and
     no img-src allowance in the Content-Security-Policy. */
  background-image:linear-gradient(45deg,transparent 50%,var(--r8-oxblood, #5a0f1b) 50%),
                   linear-gradient(135deg,var(--r8-oxblood, #5a0f1b) 50%,transparent 50%);
  background-position:calc(100% - 11px) 55%, calc(100% - 6px) 55%;
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
}

.r8-enquiry-field input:focus,
.r8-enquiry-field select:focus,
.r8-enquiry-field textarea:focus{
  outline:none;
  border-bottom-color:var(--r8-oxblood, #5a0f1b);
  border-bottom-width:2px;
}

.r8-enquiry :focus-visible{
  outline:2px solid var(--r8-oxblood, #5a0f1b);
  outline-offset:3px;
}

.r8-enquiry-field :is(input, select, textarea):focus-visible{
  outline:2px solid var(--r8-dark, #31080f);
  outline-offset:2px;
}

/* Marked only after the person has actually interacted with the field. :invalid on its own
   fires the moment the page loads, because an empty required field is invalid from the start,
   and :not(:placeholder-shown) does not help: it is true when there is no placeholder at all.
   That combination marked name and email as wrong before anyone had typed a character. */
.r8-enquiry-field input:user-invalid,
.r8-enquiry-field select:user-invalid{
  border-bottom-color:var(--r8-oxblood, #5a0f1b);
}

.r8-enquiry-options{
  margin:0 0 1.25rem;
  border-block:1px solid var(--r8-line-dark, #5c829c);
}

.r8-enquiry-options summary{
  box-sizing:border-box;
  min-block-size:44px;
  padding:.7rem 0;
  font-size:.875rem;
  font-weight:600;
  line-height:1.5;
  cursor:pointer;
}

.r8-enquiry-options[open] summary{ margin-block-end:.75rem; }

.r8-enquiry .r8-enquiry-field .r8-enquiry-field-error{
  margin:.4rem 0 0;
  color:inherit;
  font-size:.875rem;
  font-weight:600;
}

.r8-enquiry-sms{
  min-width:0;
  margin:0 0 24px;
  padding:8px 12px 12px;
  border:2px solid var(--r8-line-dark, #5c829c);
}

.r8-enquiry-sms legend{
  padding:0 5px;
  font-size:14px;
  font-weight:600;
}

.r8-enquiry-sms-choice{
  display:grid;
  grid-template-columns:20px minmax(0, 1fr);
  gap:10px;
  align-items:start;
  min-height:44px;
  padding:8px 0;
  font-size:14px;
  line-height:1.5;
  cursor:pointer;
}

.r8-enquiry-sms-choice input{
  width:18px;
  height:18px;
  margin:2px 0 0;
  accent-color:currentColor;
}

.inquiry-page #enq-sms-info,
.consultation .r8-enquiry #enq-sms-info{
  margin:4px 0 0;
  font-size:12px;
  line-height:1.6;
  color:var(--r8-ink-muted);
}

.r8-enquiry #enq-sms-info a{
  color:inherit;
  text-decoration:underline;
}

.r8-enquiry-actions{
  display:flex;
  align-items:center;
  gap:28px;
  flex-wrap:wrap;
}

/* Inverted against the section's ivory button: inside an ivory panel the primary action is
   the oxblood one. r8-brand.css sets `.selected-direction .consultation .button` to ivory on
   ivory at 0,3,0, which rendered this button as bare text on the panel, so the selector here
   has to outrank it rather than rely on being loaded later. */
.selected-direction .consultation .r8-enquiry .r8-enquiry-send,
.consultation .r8-enquiry .r8-enquiry-send{
  background:var(--r8-oxblood, #5a0f1b);
  border-color:var(--r8-oxblood, #5a0f1b);
  color:var(--r8-ivory, #f7f2e8);
  gap:0;
  cursor:pointer;
}

.consultation .r8-enquiry .r8-enquiry-send[disabled]{ opacity:.55; cursor:default; }

.consultation .r8-enquiry .r8-enquiry-alt{
  color:var(--r8-oxblood, #5a0f1b);
  font-size:12px;
  gap:0;
  padding:12px 0;
}

.r8-enquiry-status:empty{ display:none; }

.consultation .r8-enquiry .r8-enquiry-message,
.inquiry-page .r8-enquiry .r8-enquiry-message{
  margin:20px 0 0;
  padding:14px 16px;
  font-size:14px;
  line-height:1.65;
  background:#ece3d4;
  border-left:2px solid var(--r8-oxblood, #5a0f1b);
  color:var(--r8-dark, #31080f);
}

/* Off-screen rather than display:none, because a bot reading the DOM can see
   display:none and skip the field, which is the whole point of the trap. */
.r8-enquiry-trap{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

@media (max-width:700px){
  .r8-enquiry{ padding:26px 22px 24px; margin-top:30px; }
  .r8-enquiry :is(h1,h3){ font-size:23px; }
  .r8-enquiry-actions{ gap:16px; }
  .consultation .r8-enquiry .r8-enquiry-send{ width:100%; justify-content:center; }
}

@media print{
  .r8-enquiry{ display:none; }
}


.r8-sms-conditions{ display:block; margin-top:4px; font-size:.9em; }
.inquiry-page{ box-sizing:border-box; max-width:740px; margin:0 auto; padding:24px 16px; font:16px/1.5 system-ui,sans-serif; }
.inquiry-page *, .inquiry-page *::before, .inquiry-page *::after{ box-sizing:border-box; }
.inquiry-page .r8-enquiry{ max-width:none; margin-top:20px; }
.inquiry-page .r8-enquiry-message[hidden]{ display:none; }
.inquiry-page .r8-enquiry-send{ padding:12px 18px; font:inherit; cursor:pointer; }
.inquiry-page footer{ margin-top:24px; font-size:14px; }
.inquiry-page a{ color:inherit; }
.inquiry-page .r8-inquiry-brand{ font:400 26px/1.2 Georgia,'Times New Roman',serif; }

.inquiry-page .skip-link {
  position: fixed;
  z-index: 1;
  inset-block-start: .65rem;
  inset-inline-start: 1rem;
  min-block-size: 2.75rem;
  padding: .65rem 1rem;
  background: var(--r8-ivory, #f7f2e8);
  clip-path: inset(50%);
}

.inquiry-page .skip-link:focus { clip-path: none; }

.inquiry-page .r8-intake-retired {
  margin-block: 1.25rem;
  padding: .75rem 1rem;
  border-inline-start: 2px solid var(--r8-line-dark, #5c829c);
  background: var(--r8-ivory, #f7f2e8);
}

.inquiry-page .r8-intake-retired:not(:target) { display: none; }
