@media screen and (width > 768px) {
  .container {
    padding: 80px 0 70px;
  }
}
@media screen and (width <= 768px) {
  .container {
    padding: 64px 0 48px;
  }
}

form {
  width: 100%;
}
@media screen and (width > 1024px) {
  form {
    margin: 0 auto;
    max-width: 954px;
    padding: 0 72px;
  }
}
@media screen and (width <= 1024px) {
  form {
    padding: 0 24px;
  }
}

.inquiry {
  display: flex;
  margin-bottom: 56px;
}
.inquiry dt {
  font-weight: 700;
}
.inquiry dt label {
  align-items: center;
  display: flex;
  gap: 12px;
}
.inquiry dd {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
@media screen and (width > 1024px) {
  .inquiry {
    flex-wrap: wrap;
    gap: 32px 0;
  }
  .inquiry dt {
    padding: 18px 0;
    width: 176px;
  }
  .inquiry dd {
    width: calc(100% - 176px);
  }
}
@media screen and (width <= 1024px) {
  .inquiry {
    flex-direction: column;
    gap: 16px;
  }
  .inquiry dt,
  .inquiry dd {
    width: 100%;
  }
  .inquiry dd {
    margin-bottom: 16px;
  }
}

.required {
  background: var(--color-primary);
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.1;
  padding: 2px 8px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  background: var(--color-primary05);
  border: solid 2px var(--color-primary05);
  border-radius: 4px;
  height: 56px;
  padding: 16px;
  width: 100%;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  border: solid 2px var(--color-primary40);
}

textarea {
  background: var(--color-primary05);
  border: solid 2px var(--color-primary05);
  border-radius: 4px;
  min-height: 240px;
  padding: 16px;
  width: 100%;
}

::placeholder {
  color: #999;
}

.rule-message {
  color: #999;
  line-height: 1.1;
}

.error-message {
  color: var(--color-accent);
  line-height: 1.1;
}

.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.checkbox-list li {
  line-height: 1.5;
}

input[type="checkbox"] {
  display: none;
}

.checkbox-list label {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
  position: relative;
}
.checkbox-list label::before {
  background: var(--color-primary05);
  border: solid 1px var(--color-primary20);
  border-radius: 4px;
  content: "";
  display: block;
  flex-shrink: 0;
  height: 24px;
  width: 24px;
}
.checkbox-list label:has(:checked)::before {
  background: var(--color-primary20) url(/assets/img/contact/check.png)
    no-repeat center center / contain;
}

/* バリデーション・エラー時の表示/非表示 */
.error-message,
.validated-icon,
.error-icon {
  display: none;
}

.validated .validated-icon {
  display: block;
  position: absolute;
}

.error .error-icon {
  display: block;
  position: absolute;
}
@media screen and (width > 1024px) {
  .validated .validated-icon,
  .error .error-icon {
    top: 14px;
    right: -48px;
  }
}
@media screen and (width <= 1024px) {
  .validated .validated-icon,
  .error .error-icon {
    top: -36px;
    right: 0;
  }
}

.error input[type="text"],
.error input[type="email"],
.error input[type="tel"] {
  border-color: var(--color-accent);
}

.error .rule-message {
  display: none;
}
.error .error-message {
  display: block;
}

pre {
  line-height: 2;
  white-space: pre-wrap;
  width: 100%;
}
pre br {
  display: none;
}

/* privacy */
.privacy {
  border: solid 1px var(--color-primary50);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  margin: 0 auto 56px;
  max-width: 800px;
  width: 100%;
}
.privacy dt {
  color: var(--color-primary);
  font-weight: 700;
  text-align: center;
}
.privacy dd {
  display: flex;
  flex-direction: column;
}
.privacy dd pre {
  background: var(--color-primary05);
  border-radius: 4px;
  padding: 16px;
  overflow-y: scroll;
}
@media screen and (width > 768px) {
  .privacy {
    gap: 24px;
    padding: 24px 32px;
  }
  .privacy dd {
    gap: 24px;
  }
  .privacy dd pre {
    height: 240px;
  }
}
@media screen and (width <= 768px) {
  .privacy {
    gap: 16px;
    padding: 16px;
  }
  .privacy dd {
    gap: 16px;
  }
  .privacy dd pre {
    height: 400px;
  }
}

.privacy-agree-area {
  align-items: center;
  border: solid 1px var(--color-primary20);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  height: 72px;
  justify-content: center;
  max-width: 330px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}
.privacy-agree-area::before {
  background: var(--color-primary05);
  border: solid 1px var(--color-primary20);
  border-radius: 4px;
  content: "";
  display: block;
  flex-shrink: 0;
  height: 24px;
  width: 24px;
}
.privacy-agree-area:has(:checked) {
  background: var(--color-primary20);
}
.privacy-agree-area:has(:checked)::before {
  background: #fff url(/assets/img/contact/check.png) no-repeat center center /
    contain;
  border: none;
}
@media screen and (width > 768px) {
  .privacy-agree-area {
    gap: 16px;
  }
}
@media screen and (width <= 768px) {
  .privacy-agree-area {
    gap: 8px;
  }
}

.privacy .error-message {
  margin-top: -4px;
  text-align: center;
}
.error .privacy-agree-area {
  border-color: var(--color-accent);
}

/* submit */
.form-submit {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.submit-btn {
  align-items: center;
  background: var(--color-primary);
  border-radius: 8px;
  color: #fff;
  display: flex;
  height: 56px;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  width: 272px;
}
.submit-btn:not(:disabled) {
  border: solid 2px var(--color-primary);
  cursor: pointer;
}
.submit-btn:not(:disabled):hover {
  color: var(--color-primary);
}
.submit-btn:not(:disabled):hover span {
  position: relative;
  z-index: 1;
}
.submit-btn:not(:disabled)::after {
  background: #fff;
  position: absolute;
  top: 0;
  left: 0;
  content: "";
  width: 100%;
  height: 100%;
  transform: scale(0, 1);
  transform-origin: left top;
  transition: 0.2s cubic-bezier(0.45, 0, 0.55, 1);
  z-index: 0;
}
.submit-btn:not(:disabled):hover::after {
  transform: scale(1, 1);
}

.submit-btn:disabled {
  background: #999;
}
