/* Fixed non-home previews only. Applied after the page stylesheet by the shared
   six-field enquiry adapter; no production or homepage selectors are affected. */
body.studio-page .roky-shared-enquiry {
  --shared-enquiry-bg: #474644;
  --shared-enquiry-field: #eeeeee;
  --shared-enquiry-ink: #222222;
  --shared-enquiry-accent: #00c7b1;
  --shared-enquiry-error: #aa2926;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  overflow: visible;
  padding-block: 64px;
  color: #fff;
  background: var(--shared-enquiry-bg);
}

/* The contact template has a more-specific transparent grid background rule.
   Override only that enquiry section, leaving the breadcrumb and page shell as-is. */
body.studio-page main.studio-contact section.studio-contact-grid.roky-shared-enquiry {
  color: #fff;
  background: #474644;
}

/* The project-detail template's teal enquiry selector is more specific than
   the shared section rule; keep this one section on the approved charcoal. */
body.studio-page .studio-project .project-home-enquiry.roky-shared-enquiry {
  color: #fff;
  background: #474644;
}

body.studio-page .roky-shared-enquiry :is(.enquiry-layout, .services-decision-inner),
body.studio-page .roky-shared-enquiry.studio-contact-grid {
  box-sizing: border-box;
  display: grid;
  width: min(80vw, 1194px);
  max-width: none;
  min-width: 0;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.64fr);
  gap: 60px;
  align-items: start;
}

body.studio-page .roky-shared-enquiry :is(.enquiry-layout, .services-decision-inner, .studio-contact-lead, .studio-contact-form, .enquiry-lead, .services-decision-copy, .services-decision-form, .home-enquiry-card-integrated, .home-enquiry-direct-form, .home-enquiry-form-grid, .home-enquiry-field, .home-enquiry-actions) {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

body.studio-page .roky-shared-enquiry :is(.services-decision-form, .studio-contact-form, .enquiry-card.home-enquiry-card-integrated, .home-enquiry-direct-form) {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

body.studio-page .roky-shared-enquiry :is(.enquiry-lead h2, .services-decision-copy h2, .studio-contact-lead h1) {
  max-width: 11em;
  margin: 0 0 34px;
  color: #fff;
  font-size: 38px;
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}

body.studio-page .roky-shared-enquiry :is(.enquiry-lead, .services-decision-copy, .studio-contact-lead, .enquiry-lead p, .services-decision-copy p, .studio-contact-lead p) {
  color: #fff;
}

body.studio-page .roky-shared-enquiry :is(.direct-contact, .services-decision-phone, .studio-contact-channels a) {
  box-sizing: border-box;
  max-width: 410px;
  min-height: 54px;
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, .64);
}

body.studio-page .roky-shared-enquiry :is(.studio-contact-channels li, .studio-contact-channels li:last-child) {
  border-color: rgba(255, 255, 255, .64);
}

body.studio-page .roky-shared-enquiry :is(.studio-contact-socials a, .services-decision-link) {
  color: #fff;
  border-color: rgba(255, 255, 255, .64);
}

body.studio-page .roky-shared-enquiry :is(.direct-contact, .services-decision-phone, .studio-contact-channels a, .studio-contact-socials a, .services-decision-link):focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: none;
}

body.studio-page .roky-shared-enquiry .home-enquiry-form-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

body.studio-page .roky-shared-enquiry .home-enquiry-field--full {
  grid-column: 1 / -1;
}

body.studio-page .roky-shared-enquiry .home-enquiry-field label {
  display: block;
  margin: 0 0 7px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .2px;
}

body.studio-page .roky-shared-enquiry .home-enquiry-required {
  margin-left: 3px;
  color: #ff8b7f;
}

body.studio-page .roky-shared-enquiry .home-enquiry-control {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 35px;
  margin: 0;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  outline: 0;
  color: var(--shared-enquiry-ink);
  background: var(--shared-enquiry-field);
  box-shadow: none;
  caret-color: var(--shared-enquiry-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  transition: background-color 160ms ease;
}

body.studio-page .roky-shared-enquiry textarea.home-enquiry-control {
  height: 192px;
  min-height: 192px;
  padding-top: 12px;
  resize: vertical;
}

@media (hover: hover) and (pointer: fine) {
  body.studio-page .roky-shared-enquiry .home-enquiry-control:not(:disabled):not(:focus-visible):hover {
    background: #fff;
  }
}

body.studio-page .roky-shared-enquiry .home-enquiry-control:focus-visible:not([aria-invalid="true"]) {
  border: 0;
  outline: 0;
  background: #fff;
  box-shadow: inset 0 0 0 2px #22342e;
}

body.studio-page .roky-shared-enquiry .home-enquiry-control[aria-invalid="true"] {
  border: 0;
  outline: 3px solid var(--shared-enquiry-error);
  outline-offset: -3px;
  background: #fff;
  box-shadow: none;
}

body.studio-page .roky-shared-enquiry .home-enquiry-control[aria-invalid="true"]:focus-visible {
  outline-color: #ff8b7f;
  outline-offset: 3px;
}

body.studio-page .roky-shared-enquiry .home-enquiry-control:disabled {
  color: #5d5b58;
  background: #d6d4d1;
  cursor: not-allowed;
  opacity: 1;
}

body.studio-page .roky-shared-enquiry .home-enquiry-control:-webkit-autofill {
  -webkit-text-fill-color: var(--shared-enquiry-ink);
  -webkit-box-shadow: inset 0 0 0 1000px var(--shared-enquiry-field);
}

body.studio-page .roky-shared-enquiry .home-enquiry-error {
  margin: 7px 0 0;
  color: #ffd5d0;
  font-size: 13px;
  line-height: 1.5;
}

body.studio-page .roky-shared-enquiry .home-enquiry-error-summary,
body.studio-page .roky-shared-enquiry .home-enquiry-status {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-left: 3px solid #ff8b7f;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 13px;
  line-height: 1.55;
}

body.studio-page .roky-shared-enquiry .home-enquiry-error-summary a,
body.studio-page .roky-shared-enquiry .home-enquiry-privacy a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: .2em;
}

body.studio-page .roky-shared-enquiry .home-enquiry-actions {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 22px;
}

body.studio-page .roky-shared-enquiry .home-enquiry-submit {
  box-sizing: border-box;
  display: inline-flex;
  width: 135px;
  min-width: 135px;
  height: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--shared-enquiry-accent);
  border-radius: 5px;
  outline: 3px solid transparent;
  outline-offset: 3px;
  color: #fff;
  background: var(--shared-enquiry-accent);
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

body.studio-page .roky-shared-enquiry .home-enquiry-submit:hover,
body.studio-page .roky-shared-enquiry .home-enquiry-submit:focus-visible {
  color: var(--shared-enquiry-accent);
  background: transparent;
}

body.studio-page .roky-shared-enquiry .home-enquiry-submit:focus-visible {
  outline-color: #fff;
  box-shadow: none;
}

body.studio-page .roky-shared-enquiry .home-enquiry-privacy {
  max-width: 58ch;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  line-height: 1.65;
}

body.studio-page .roky-shared-enquiry .home-enquiry-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

body.studio-page .roky-shared-enquiry [hidden] {
  display: none !important;
}

@media (max-width: 800px) {
  body.studio-page .roky-shared-enquiry :is(.enquiry-layout, .services-decision-inner),
  body.studio-page .roky-shared-enquiry.studio-contact-grid {
    width: calc(100% - 40px);
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  body.studio-page .roky-shared-enquiry :is(.enquiry-lead h2, .services-decision-copy h2, .studio-contact-lead h1) {
    font-size: 34px;
  }
  body.studio-page .roky-shared-enquiry .home-enquiry-control:not(textarea) {
    height: 48px;
    padding: 12px;
  }
  body.studio-page .roky-shared-enquiry .home-enquiry-submit {
    width: 129px;
    min-width: 129px;
    height: 40px;
    min-height: 40px;
  }
}

@media (max-width: 640px) {
  body.studio-page .roky-shared-enquiry .home-enquiry-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.studio-page .roky-shared-enquiry .home-enquiry-field--full {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.studio-page .roky-shared-enquiry :is(.home-enquiry-control, .home-enquiry-submit) {
    transition-duration: 0ms;
  }
}
