@charset "UTF-8";
/* ========================================
   Contact Page
======================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  clip: rect(0 0 0 0);
}
.contact-intro {
  text-align: left;
  margin-bottom: 2rem;
  line-height: 2;
  color: var(--color-text);
  margin-top: 2rem;
}

.contact-intro a {
  color: var(--color-accent);
  text-decoration: underline;
  transition: var(--transition-normal);
}

.contact-intro a:hover {
  color: var(--color-main);
}

/* Form Container */
.contact-form {
  background: var(--color-bg);
  margin-top: 2rem;
}

.mailform {
  width: 100%;
}

/* Step Indicator */
#m-step {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: var(--space-2) 0;
  list-style: none;
}

#m-step li {
  position: relative;
  color: var(--color-grey);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#m-step li::before {
  content: attr(data-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--color-bg);
  color: var(--color-grey);
  font-weight: var(--weight-bold);
  transition: var(--transition-normal);
}

#m-step li.now,
#m-step li.text.now {
  color: var(--color-main);
}

#m-step li.now::before,
#m-step li.text.now::before {
  background: var(--color-accent);
  color: var(--color-bg);
}

#m-step li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent var(--color-grey);
}

/* Required Text */
.required-text {
  text-align: left;
  margin-bottom: 2rem;
  color: var(--color-text);
  font-size: 1rem;
}

/* Form Table */
#form {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

#form th,
#form td {
  /* padding: 1rem; */
  padding-block: 1rem;
  vertical-align: middle;
}

#form th {
  text-align: left;
  font-weight: var(--weight-medium);
  color: var(--color-text);
  width: 260px;
}

#form td {
  background: var(--color-bg);
}

/* Required/Optional Badges */
.must,
.any {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  margin-right: 0.5rem;

  font-size: 1rem;
  font-weight: var(--weight-bold);
  line-height: 1;
}

.must {
  background: var(--color-accent);
  color: var(--color-bg);
}

.any {
  background: var(--color-grey);
  color: var(--color-bg);
}

/* Form Elements */
#form input[type="text"],
#form input[type="email"],
#form input[type="tel"],
#form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  font-size: 1rem;
  line-height: 1.7;
  transition: var(--transition-normal);
  background: var(--color-bg);
  box-sizing: border-box;
}

#form input[type="text"]:focus,
#form input[type="email"]:focus,
#form input[type="tel"]:focus,
#form textarea:focus {
  outline: none;
  border-color: var(--color-main);
  box-shadow: 0 0 0 3px rgba(0, 139, 213, 0.1);
}

#form input[type="text"]::placeholder,
#form textarea::placeholder {
  color: var(--color-grey);
  font-size: 1rem;
}
#form input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 0.7rem;
  line-height: 2;
  padding: 0.5rem 0;
  white-space: normal;
  word-break: break-all;
  box-sizing: border-box;
}

#form textarea {
  min-height: 150px;
  resize: vertical;
}

/* Zipcode Field */
#form .zipcode {
  max-width: 150px;
  margin-right: 0.5rem;
}

/* Phone Field */
#form .tel {
  max-width: 200px;
}

/* File Upload */
#form input[type="file"] {
  padding: 0.5rem 0;
  font-size: 1rem;
}

#fileList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#fileList li {
  margin-bottom: 0.5rem;
}

/* Buttons */
.center {
  text-align: center;
  margin-top: 2rem;
}

/* 戻るボタン（グレー） */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 1rem 2.5rem;
  background: #6c757d;
  color: var(--color-bg);
  border-radius: 8px;
  font-size: var(--font-size-large);
  font-weight: var(--weight-bold);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  margin: 0 0.5rem;
}

.button:hover {
  background: var(--color-bg);
  color: #6c757d;
}

.button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.2);
}

/* 送信・確認ボタン（メインカラー） */
.button.submit {
  background: var(--color-accent);
  color: var(--color-bg);
  position: relative;
  border-style: none;
}
.button-return {
  border-style: none;
}
.button-return:hover {
  background: var(--color-main);
  color: var(--color-bg);
}
.button.submit:hover {
  background: var(--color-main);
  color: var(--color-bg);
}

.button.submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 48, 142, 0.2);
}

.button.submit::after {
  content: "→";
  position: absolute;
  right: 1.5rem;
  transition: var(--transition-normal);
}

/* ===== Attachment Images ===== */
.mailform img {
  max-width: 180px;
  max-height: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid #ddd;
}
/* ===== File Delete Checkbox ===== */
.mailform label {
  display: inline-flex;
  align-items: center;
  text-align: left;
  margin-bottom: 0.5rem;
  white-space: nowrap;
}

.mailform input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* ========================================
   送信完了画面
======================================== */
#finish {
  margin: 0 auto;
  width: 100%;
  margin-top: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finish-message {
  background: var(--color-bg);
  text-align: center;
}

.finish-message p {
  font-size: 1rem;
  color: var(--color-main);
  font-weight: var(--weight-bold);
  margin-bottom: 2rem;
  width: 100%;
}

.finish-message small {
  display: block;
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--color-text);
  line-height: 2;
  font-weight: normal;
}

/* トップに戻るボタン（必要な場合） */
.finish-message .button {
  margin-top: 2rem;
  display: inline-block;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 960px) {
  .contact-form__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-block: 2rem;
  }

  #m-step {
    flex-direction: row;
    gap: 0.5rem;
    font-size: 1rem;
    padding: 2px 0;
    align-items: center;
    justify-content: space-around;
    padding-left: 0;
  }

  #m-step li {
    position: relative;
    width: auto;
    padding-bottom: 0;
    flex-direction: column;
    text-align: center;
    gap: 0.3rem;
  }

  #m-step li::before {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
    margin-bottom: 0.2rem;
  }

  #m-step li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(100% + 1rem);
    top: 14px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--color-grey);
  }

  /* Form Table */
  #form {
    display: block;
  }

  #form tbody,
  #form tr,
  #form th,
  #form td {
    display: block;
    width: 100%;
  }

  #form th {
    width: 100%;
  }

  #form td {
    padding-top: 0;
  }

  #form tr {
    padding-bottom: 2rem;
  }

  /* Input Fields */
  #form input[type="text"],
  #form input[type="email"],
  #form input[type="tel"],
  #form textarea {
    font-size: 16px; /* iOS zoom prevention */
  }

  #form .zipcode,
  #form .tel {
    max-width: 100%;
  }

  #form td {
    padding-block: 0;
  }
  #form th {
    padding-block: 0.2em;
  }
  /* Buttons */
  .button,
  .button.submit {
    width: 100%;
    max-width: 300px;
    margin: 0.5rem auto;
    display: flex;
  }

  /* 送信完了画面 */

  .finish-message {
    margin-top: 2rem;
  }

  .finish-message p {
    font-size: 1rem;
  }

  .finish-message small {
    font-size: 1rem;
    margin-top: 2rem;
  }
  .center {
    text-align: center;
    margin-top: 0;
  }
}

/* エラー表示 */
.mailFormErrorElement {	background: #FFF2F2 !important;}
.mailFormErrorMessage {	color: red; font-size:90%; font-weight: bold;}
