/* ========================================
   Contact
======================================== */

.p-contact__lead {
  margin: 0 0 56px;
  line-height: var(--lh-body);
}

@media (max-width: 1023px) {
  .c-cf7__head br.to-pc {
    display: none;
  }
}

/* ========================================
   CF7 Form
======================================== */

.c-cf7 {
  --cf7-gap-row: 24px;
  --cf7-gap-req: 16px;

  --cf7-fs-label: 14px;
  --cf7-fs-input: 14px;

  --cf7-color-placeholder: #7f8080;
  --cf7-color-error: #b7282c;

  --cf7-field-bg: #f2f2f2;
  --cf7-field-radius: 6px;
  --cf7-field-pad: 20px;
}

.c-cf7__row {
  display: grid;
  grid-template-columns: 210px 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.c-cf7__row--textarea,
.c-cf7__row--privacy,
.c-cf7__row:has(.wpcf7-not-valid-tip) {
  align-items: start;
}

.c-cf7__row--textarea .c-cf7__head,
.c-cf7__row--privacy .c-cf7__head,
.c-cf7__row:has(.wpcf7-not-valid-tip) .c-cf7__head {
  margin-top: 10px;
}

/* ========================================
   CF7 Head
======================================== */

.c-cf7__head {
  width: 210px;
}

.c-cf7__head p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
}

.c-cf7__label {
  font-size: var(--cf7-fs-label);
  line-height: 1.6;
}

.c-cf7__required {
  color: var(--cf7-color-error);
  font-size: var(--cf7-fs-label);
  white-space: nowrap;
}

.c-cf7__required--empty {
  color: transparent;
}

/* ========================================
   CF7 Field
======================================== */

.c-cf7__field {
  width: 100%;
  justify-self: end;
}

.c-cf7 input[type="text"],
.c-cf7 input[type="email"],
.c-cf7 input[type="tel"],
.c-cf7 select,
.c-cf7 textarea {
  width: 100%;
  padding: var(--cf7-field-pad);
  color: #000000;
  font-size: var(--cf7-fs-input);
  background: var(--cf7-field-bg);
  border: none;
  border-radius: var(--cf7-field-radius);
  outline: none;
  box-sizing: border-box;
}

.c-cf7 textarea {
  min-height: 220px;
  height: 240px;
  padding: 12px 18px;
  resize: vertical;
}

.c-cf7 input::placeholder,
.c-cf7 textarea::placeholder {
  color: var(--cf7-color-placeholder);
}

/* select */

.c-cf7__field--select {
  position: relative;
}

.c-cf7__field--select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 20px;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  background: url("/wp-content/themes/kawasakishokuhin2026/assets/img/common/select-icon.svg")
    no-repeat;
  background-size: contain;
  pointer-events: none;
}

.c-cf7 select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
}

/* validation */

.c-cf7 .wpcf7-not-valid-tip {
  margin-top: 8px;
  color: var(--cf7-color-error);
  font-size: 14px;
}

.c-cf7 .wpcf7-response-output {
  margin: 24px 0 0;
  font-size: 14px;
}

/* ========================================
   Privacy Box
======================================== */

.c-cf7__privacyBox {
  max-height: 240px;
  overflow-y: auto;
  padding: 12px 18px;
  background: var(--cf7-field-bg);
  border-radius: var(--cf7-field-radius);
  box-sizing: border-box;
}

.c-cf7__privacyBox p {
  margin: 0;
  font-size: 14px;
  line-height: 2;
}

.c-cf7__privacyBox p + p {
  margin-top: 1.5em;
}

/* ========================================
   Agree
======================================== */

.c-cf7__agree {
  margin: 16px 0 0;
}

.c-cf7__agree .wpcf7-form-control-wrap,
.c-cf7__agree .wpcf7-acceptance,
.c-cf7__agree .wpcf7-list-item {
  display: block;
  margin: 0;
}

.c-cf7__agree .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.c-cf7 input[type="checkbox"] {
  position: relative;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid #040000;
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.c-cf7 input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #040000;
  border-bottom: 2px solid #040000;
  transform: rotate(45deg);
}

.c-cf7__agree .wpcf7-list-item-label {
  display: inline-block;
  font-size: 16px;
  line-height: 1.6;
}

/* ========================================
   Actions
======================================== */

.c-cf7__actions {
  display: flex;
  justify-content: center;
  margin-top: 0;
}

.c-cf7 input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 152px;
  height: 54px;
  color: #ffffff;
  font-size: 18px;
  background: #7f8080;
  border: none;
  border-radius: 2px;
  cursor: pointer;
}

.wpcf7-spinner {
  display: none;
}

@media (hover: hover) {
  .c-cf7 input[type="submit"]:hover {
    opacity: 0.85;
  }
}

/* ========================================
   Responsive
======================================== */

@media (max-width: 1023px) {
  .c-cf7 {
    --cf7-field-pad: 12px;
  }

  .c-cf7__row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 20px;
  }

  .c-cf7__head {
    width: auto;
  }

  .c-cf7__head p {
    justify-content: flex-start;
    gap: 6px;
  }

  .c-cf7__field {
    width: 100%;
    justify-self: stretch;
  }

  .c-cf7__row--textarea .c-cf7__head,
  .c-cf7__row--privacy .c-cf7__head {
    margin-top: 0;
  }

  .c-cf7__row:has(.wpcf7-not-valid-tip),
  .c-cf7__row:has(.wpcf7-not-valid-tip) .c-cf7__head {
    align-items: stretch;
    margin-top: 0;
  }

  .c-cf7__privacyBox {
    max-height: 220px;
    padding: 20px;
  }

  .c-cf7__privacyBox p {
    font-size: 14px;
    line-height: 1.9;
  }

  .c-cf7__agree {
    margin-top: 14px;
  }

  .c-cf7__agree .wpcf7-list-item-label {
    font-size: 14px;
    line-height: 1.6;
  }
}
