/* Confirmation screen for the contact forms (contacts and systemconsult). Plain CSS, separate from the Sass build. */

/* Buttons: same look as the old confirm / back / submit buttons (the base .btn_area input rules still apply). */
.secContactsForm .form_inner .btn_area input.access-confirm-btn {
  width: 40%;
  max-width: 200px;
  min-width: 160px;
}
.secContactsForm .form_inner .btn_area input.access-back-btn { width: auto; }
.secContactsForm .form_inner .btn_area input[hidden] { display: none; }
/* The final-send button exists only on the confirm screen. It is also disabled until then, so it cannot
 * be used by pressing Enter, and stays unavailable if JavaScript does not run. */
.wpcf7-form:not(.is-confirming) .access-final-btn { display: none; }

/* Confirm screen only (the input screen is untouched): compact rows on a white background. The real
 * fields stay in the form (hidden, still submitted); contact-confirm.js shows each value as plain text
 * (.access-confirm-value) so it can wrap, which an <input> cannot. That also removes the browser's
 * autofill tint and the input font. The label | value side-by-side layout is kept on PC.
 * The selector prefix beats contacts.css / contact-improvements.css on both forms. */
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item {
  margin: 0;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #e4e4e4;
  border-top-width: 0;
  cursor: default;
}
.secContactsForm .form_inner .wpcf7-form.is-confirming > :not(.form_item) + .form_item { border-top-width: 1px; }
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .head {
  width: 220px;
  padding-right: 12px;
  font-size: 1rem;
}
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .head label {
  height: auto;
  line-height: 1.6;
  color: #444;
}
/* Required / optional badges only matter while filling in. */
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .head .require,
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .head .optional { display: none; }
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .body { overflow: visible; border-radius: 0; }
/* The real controls are only hidden (display:none controls are still part of the submitted form data). */
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .body .wpcf7-form-control-wrap,
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .body .selectbox-001,
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .body input:not([type="hidden"]),
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .body textarea { display: none; }
/* The value as text: same Gothic font as the label, wraps long words / addresses, and keeps line breaks,
 * runs of spaces, special characters and emoji exactly as typed (pre-wrap, no trimming). */
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .body .access-confirm-value {
  margin: 0;
  padding: 2px 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.7;
  color: #222;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  tab-size: 4;
}
.secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .body .access-confirm-value.is-empty { color: #666; }
.secContactsForm .form_inner .wpcf7-form.is-confirming .contact-feedback { padding: 12px 14px; margin-bottom: 12px; font-size: 15px; }
.secContactsForm .form_inner .wpcf7-form.is-confirming .btn_area { margin: 20px auto; }
/* Contact Form 7 dims every [inert] element (".wpcf7 [inert] { opacity: .5 }"). The rows are inert on the
 * confirm screen, but their text must stay as readable as on the input screen. */
.wpcf7 .wpcf7-form.is-confirming .form_item[inert] { opacity: 1; }

/* Input screen font: one Gothic font (Noto Sans JP, the same stack as <body>) for what is typed, the
 * placeholders and the select. contacts.css sets 'Noto Serif JP' on input / textarea / ::placeholder and
 * nothing on select. Only the font family changes: size, colour, spacing and the buttons (which are also
 * <input> elements) are left as they are. This file is loaded on the two contact pages only. */
.secContactsForm .form_inner .wpcf7-form input:not([type="button"]):not([type="submit"]):not([type="reset"]),
.secContactsForm .form_inner .wpcf7-form textarea,
.secContactsForm .form_inner .wpcf7-form select {
  font-family: 'Local Noto JP', 'Hiragino Adj', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', sans-serif;
}
/* One rule per placeholder selector: a selector list with an unknown pseudo-element would be dropped. */
.secContactsForm .form_inner .wpcf7-form ::placeholder { font-family: 'Local Noto JP', 'Hiragino Adj', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', sans-serif; }
.secContactsForm .form_inner .wpcf7-form ::-webkit-input-placeholder { font-family: 'Local Noto JP', 'Hiragino Adj', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', sans-serif; }
.secContactsForm .form_inner .wpcf7-form ::-moz-placeholder { font-family: 'Local Noto JP', 'Hiragino Adj', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', sans-serif; }
.secContactsForm .form_inner .wpcf7-form :-ms-input-placeholder { font-family: 'Local Noto JP', 'Hiragino Adj', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', YuGothic, Meiryo, 'Noto Sans JP', sans-serif; }

/* Summary read out to assistive technology (inert fields are not exposed), invisible on screen. */
.access-confirm-summary {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.access-confirm-summary[hidden] { display: none; }

/* Notices (also needed on the systemconsult page, which does not load contact-improvements.css). */
.secContactsForm .contact-feedback { padding: 16px; margin-bottom: 24px; background: #edf5f8; color: #173c54; border: 2px solid #225daa; border-radius: 5px; font-size: 16px; overflow-wrap: anywhere; }
.secContactsForm .contact-feedback[hidden] { display: none; }
.secContactsForm .contact-feedback.is-error { border-color: #b52f49; background: #fff0f2; color: #8b1831; }
.secContactsForm .contact-feedback.access-gate-notice { margin-top: 16px; margin-bottom: 0; }
/* Boxes that are scrolled into view must stay clear of the fixed header. */
.secContactsForm .contact-feedback { scroll-margin: 120px 0 24px; }
/* Red warning (built by contact-confirm.js): bold heading, reason, "input is kept", retry button, phone. */
.secContactsForm .contact-feedback.access-gate-alert { margin-top: 16px; margin-bottom: 0; line-height: 1.55; }
.secContactsForm .form_inner .wpcf7-form.is-confirming .contact-feedback.access-gate-alert { padding: 10px 14px; }
.access-gate-alert p { margin: 0 0 4px; }
.access-gate-alert p:last-child { margin-bottom: 0; }
.access-gate-alert .access-alert-title { margin-bottom: 2px; font-size: 1.0625rem; }
/* While the red warning shows a refusal by the security check, Contact Form 7's own response box would show
 * the same message a second time: hide it. It is back as soon as the warning goes (retry, new send, back). */
.wpcf7-form.access-security-alert .wpcf7-response-output { display: none !important; }
.access-gate-alert .access-alert-retry {
  display: inline-block;
  min-height: 40px;
  margin: 4px 0 6px;
  padding: 8px 16px;
  font: inherit;
  font-weight: bold;
  color: #fff;
  background: #ea617c;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}
.access-gate-alert .access-alert-retry:hover { background: #225daa; }
.access-gate-alert .access-alert-phone { font-weight: bold; }
.secContactsForm .contact-feedback.access-gate-alert .access-alert-phone a { display: inline; margin: 0; color: inherit; text-decoration: underline; }
/* "JavaScript is required" notice: hidden while the page works. It appears only when scripting is off,
 * or when Contact Form 7's script has not started (wrapper still ".no-js") after 4 seconds, so it does
 * not flash while the page is loading. */
.access-nojs { display: none; margin: 16px 0; padding: 12px 14px; border: 2px solid #b52f49; background: #fff0f2; color: #8b1831; border-radius: 5px; }
.wpcf7.no-js .access-nojs { display: block; opacity: 0; animation: access-nojs-in 0s linear 4s forwards; }
@keyframes access-nojs-in { to { opacity: 1; } }
@media (scripting: none) {
  .access-nojs,
  .wpcf7.no-js .access-nojs { display: block; opacity: 1; animation: none; }
}

/* Cloudflare Turnstile (Contact Form 7's widget). appearance:interaction-only keeps it invisible and
 * space-free until the visitor must act; then it must never be hidden or clipped. */
.wpcf7-turnstile { display: flex !important; justify-content: center; max-width: 100%; margin: 0; overflow: visible; visibility: visible !important; }
.wpcf7-turnstile iframe { max-width: 100%; }
/* After a successful send the widget is removed from view (Contact Form 7 resets it, which would show an
 * "unchecked" widget for a moment while the thank-you page opens). */
.wpcf7-turnstile.access-ts-done { display: none !important; }

@media (max-width: 520px) {
  .secContactsForm .form_inner .btn_area input.access-confirm-btn,
  .secContactsForm .form_inner .btn_area input.access-back-btn { width: 100%; max-width: 100%; }
  /* Phone: label as a small caption right above its value, tighter rows, less scrolling. */
  .secContactsForm .form_inner .wpcf7-form.is-confirming .form_item { display: block; padding: 6px 12px; }
  .secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .head { width: auto; padding: 0 0 1px; font-size: 0.8125rem; }
  .secContactsForm .form_inner .wpcf7-form.is-confirming .form_item .head label { font-weight: bold; }
  .secContactsForm .form_inner .wpcf7-form.is-confirming .btn_area { margin: 16px auto; }
}
