/*
Theme Name: PMG Logistics
Theme URI: https://github.com/mitori06/pmg-logi
Description: PMG Logistics corporate site theme
Version: 0.2.0
Text Domain: pmg-logi
*/

/* --- WordPress generic page layout (company / privacy) --- */
.page-main .page-content { max-width: 800px; margin: 0 auto 40px; text-align: left; line-height: 1.9; }
.page-main .page-content h2 { margin: 2em 0 .6em; font-size: 1.25em; }
.page-main .page-content p, .page-main .page-content ul, .page-main .page-content table { margin-bottom: 1em; }
.page-main .page-content table { border-collapse: collapse; width: 100%; }
.page-main .page-content th, .page-main .page-content td { border: 1px solid #ddd; padding: .6em .8em; vertical-align: top; }
.page-main .page-content th { width: 30%; background: #f5f5f5; text-align: left; }

/* --- Contact Form 7 compatibility for .contact-form layout --- */
.contact .wpcf7 { display: contents; }
.contact-form .wpcf7-form-control-wrap { display: block; width: 100%; }
.contact-form .wpcf7-not-valid-tip { position: absolute; top: 0; right: 0; margin: 0; font-size: .8em; font-weight: 400; line-height: 1.6; color: #d63638; }
.contact-form .wpcf7-form-control-wrap { position: static; }
.contact-form .wpcf7-spinner { position: absolute; left: 50%; bottom: 1em; }
.contact-form .wpcf7-response-output { position: absolute; left: 0; right: 0; top: 100%; margin: 12px 0 0; padding: .6em 1em; border: 2px solid #ff7900; border-radius: 6px; background: #fff; text-align: center; font-size: 1em; font-weight: 700; color: #24251f; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.contact-form.sent .wpcf7-response-output { border-color: #2f6b3d; }
.contact-form.invalid .wpcf7-response-output, .contact-form.failed .wpcf7-response-output { border-color: #d63638; }

/* --- Contact form: added "メールアドレス" row in 基本情報 (PC: +95, SP: +70 shift) --- */
.contact { min-height: calc(2046 / 14.4 * 1cqw); }
.contact-form { height: calc(1556 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(1) > label:nth-of-type(4) { top: calc(377 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(2) legend { top: calc(518 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(1),
.contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(2) { top: calc(571 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(3),
.contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(4) { top: calc(666 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(5),
.contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(6) { top: calc(761 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(2) > label { top: calc(856 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(3) legend { top: calc(997 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(3) .contact-form__grid label:nth-child(1),
.contact-form fieldset:nth-of-type(3) .contact-form__grid label:nth-child(2) { top: calc(1050 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(3) .contact-form__grid label:nth-child(3),
.contact-form fieldset:nth-of-type(3) .contact-form__grid label:nth-child(4) { top: calc(1145 / 14.4 * 1cqw); }
.contact-form fieldset:nth-of-type(3) > label { top: calc(1240 / 14.4 * 1cqw); }
.contact-form button { top: calc(1459 / 14.4 * 1cqw); }
@media (max-width: 767px) {
  .contact { min-height: calc(1867 / 3.75 * 1cqw); }
  .contact-form { height: calc(1570 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(1) > label:nth-of-type(4) { top: calc(307 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(2) legend { top: calc(409 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(1) { top: calc(461 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(2) { top: calc(531 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(3) { top: calc(601 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(4) { top: calc(671 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(5) { top: calc(741 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(2) .contact-form__grid label:nth-child(6) { top: calc(811 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(2) > label { top: calc(881 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(3) legend { top: calc(983 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(3) .contact-form__grid label:nth-child(1) { top: calc(1035 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(3) .contact-form__grid label:nth-child(2) { top: calc(1105 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(3) .contact-form__grid label:nth-child(3) { top: calc(1175 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(3) .contact-form__grid label:nth-child(4) { top: calc(1245 / 3.75 * 1cqw); }
  .contact-form fieldset:nth-of-type(3) > label { top: calc(1315 / 3.75 * 1cqw); }
  .contact-form button { top: calc(1463 / 3.75 * 1cqw); }
}

/* --- Cloudflare Turnstile widget slot (above submit button) --- */
.contact { min-height: calc(2151 / 14.4 * 1cqw); }
.contact-form { height: calc(1661 / 14.4 * 1cqw); }
.contact-form .wpcf7-turnstile { position: absolute; top: calc(1432 / 14.4 * 1cqw); left: calc(54 / 14.4 * 1cqw); width: calc(629 / 14.4 * 1cqw); min-height: 65px; }
.contact-form .wpcf7-turnstile iframe { max-width: 100%; }
.contact-form button { top: calc(1564 / 14.4 * 1cqw); }
@media (max-width: 767px) {
  .contact { min-height: calc(1972 / 3.75 * 1cqw); }
  .contact-form { height: calc(1675 / 3.75 * 1cqw); }
  .contact-form .wpcf7-turnstile { top: calc(1440 / 3.75 * 1cqw); left: calc(26 / 3.75 * 1cqw); width: calc(283 / 3.75 * 1cqw); }
  .contact-form button { top: calc(1568 / 3.75 * 1cqw); }
}

/* --- Fix: overlapping absolute fieldsets blocked clicks on earlier fieldsets' inputs --- */
.contact-form fieldset { pointer-events: none; }
.contact-form fieldset legend,
.contact-form fieldset label,
.contact-form fieldset input,
.contact-form fieldset textarea,
.contact-form fieldset select { pointer-events: auto; }
