/* =========================
   Base typography & layout
   ========================= */

body {
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  margin: 0;
  padding: 0;
}

.body-container {
  margin: auto;
  padding: 20px;
}

.h1, .h2, .h3, .h4, .h5, .h6,
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: .5rem;
  font-weight: 500;
  line-height: 1.2;
}

.h1, h1 {
  font-size: calc(1.375rem + 1.3vw);
  text-align: center;
}

.sub-title p {
  font-size: 16px;
  text-align: center;
  margin: 0 0 4px;
  color: #555;
}

.small, small {
  font-size: .69em;
  color: rgb(103, 105, 112);
}

a, a:visited, a:hover, a:link {
  color: inherit;
  text-decoration: none;
}

/* =========================
   Form container
   ========================= */

.form-container {
  margin: auto;
  padding: 1.5rem;
  max-width: 800px;
}

form {
  background-color: #FFFFFF;
  display: block;
  padding: 1.5rem 1.5rem 2.5rem;
  border-radius: 8px;
}

/* =========================
   Messages
   ========================= */

.success-message {
  text-align: center;
  font-size: 16px;
  padding: 20px;
  color: #116329;
  background: #e6ffed;
  border: 1px solid #abdfb9;
  border-radius: 4px;
  margin-bottom: 16px;
}

.message-error {
  background: #ffecec;
  color: #900;
  border: 1px solid #f5c2c2;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  border-radius: 4px;
}

/* =========================
   Form groups & labels
   ========================= */

.form-group {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: flex-start;
  column-gap: 10px;
  width: 100%;
  margin: 0;
  padding: 1rem 0;
  align-items: center;
}

.form-group label {
  width: 100%;
  position: relative;
  margin-bottom: 0;
  display: flex;
  column-gap: 10px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  font-size: 14px;
}

.input_required:after {
  content: "\5fc5\9808"; /* 必須 */
  display: block;
  position: relative;
  padding: 3px;
  font-size: .6em;
  background-color: #db4f4a;
  color: #fff;
  width: 27px;
  margin-top: 3px;
}

/* =========================
   Inputs & textarea
   ========================= */

input,
textarea,
select {
  border-radius: 2px;
  border: 1px solid #dcd5cf;
  color: #534842;
  background: #ffffff;
  font-size: max(1rem, 16px);
  box-shadow: 0 1px rgba(231, 226, 222, .25) inset;
  transition:
    border-color .2s ease-in-out,
    box-shadow .2s ease-in-out,
    color .2s ease-in-out;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 10px 12px;
  margin: 0;
  box-sizing: border-box;
}

textarea {
  min-height: 150px;
  max-height: 450px;
  resize: vertical;
}

/* =========================
   File input (import-file)
   ========================= */

.form-group.file-input {
  justify-content: center;
  padding: 0;
}

.form-group.file-input label {
  min-width: auto;
  margin: auto;
  justify-content: center;
}

/* Outer wrapper for the custom file UI */
.import-file {
  border: none;
  padding: 0 15px 12px 0;
  margin: 0 0 8px 0;
  display: flex;
  width: 100%;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: center;
  align-items: center;
  color: black;
}

/* Label next to the file button (used in original form layout) */
.import-file label {
  width: 140px;
  text-align: left;
  height: fit-content;
}

/* The actual <input type="file"> is hidden;
   label acts as the visible button */
.input_attachments {
  display: none;
}

/* Visible file “button” label */
.custom-file-label {
  display: inline-block;
  padding: 10px 20px;
  color: black;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  border: 1px solid rgb(18, 18, 18);
}

/* When a file is selected (JS adds .uploaded) */
#fileUploadLabel.uploaded {
  background-color: #eee;
  min-width: unset;
}

/* Area where file names are printed */
#fileList {
  width: calc(100% - 140px);
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

/* Small helper text under file block */
.form-group.file-input > small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #777;
}

/* =========================
   Submit button
   ========================= */

div#submit {
  width: 100%;
  padding-top: 40px;
  display: flex;
  justify-content: center;
}

div#submit button {
  border-radius: 4px;
  border: 1px solid rgb(18, 18, 18);
  color: rgb(18, 18, 18);
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 80ms ease-in, background-color .15s ease, color .15s ease;
  background-color: white;
  max-width: 250px;
  width: 100%;
  cursor: pointer;
}

div#submit button:hover {
  background-color: #111;
  color: #fff;
}

/* =========================
   Responsive layout
   ========================= */

@media screen and (min-width: 992px) {
  .body-container {
    max-width: 1600px;
  }

  .form-group {
    flex-direction: row;
  }

  /* label + field side-by-side layout */
  .form-group label {
    min-width: 260px;
    width: unset;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    width: calc(100% - 270px);
  }

  .form-group.file-input label {
    justify-content: flex-start;
  }
  .form-group p small {
    margin-left: 260px;
  }
  .product-context { 
    width: calc(100% - 270px);
  }
}

@media screen and (min-width: 1400px) {
  h1, .h1 {
    font-size: 40px;
  }
  .sub-title p {
    font-size: 14px;
  }
}
