@charset "utf-8";

/* ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ DL.INFO-ITEMS */
:root {
  --contact-form-width: 1000px;
}

.set-max-width {
  width: min(100%, var(--contact-form-width));
  margin: 0 auto;
}

form {
  width: min(100%, var(--contact-form-width));
  padding: 0.5em;
  margin: 0 auto;
  background: white;
}

.contact-category-box {
  width: 100%;
  padding: 1em;
  margin: 1.5em 0;
  text-align: center;
  border: 1px solid hsl(var(--color-primary));
  border-radius: 6px;
}

.ask-category {
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  padding: 0;
  margin: 1em 0 0;
}

.ask-category label {
  display: block;
  width: 100%;
  padding: 0.9em 1.2em;
  cursor: pointer;
  background: #fff;
  border: 1px solid hsl(var(--color-primary));
  border-radius: 6px;
  transition: 0.2s;
}

.ask-category input[type="radio"]:checked + label {
  color: #fff;
  background-color: hsl(var(--color-primary));
}

@media (min-width: 768px) {
  .ask-category {
    flex-flow: row wrap;
    justify-content: center;
  }

  .ask-category label {
    width: auto;
    min-width: 160px;
    text-align: center;
  }

  .ask-category label:hover {
    background-color: hsl(var(--color-primary) / 15%);
  }
}

table.contact-table {
  width: 100%;
  margin-bottom: 1em;
}

table.contact-table tr {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 0.5em;
}

table.contact-table tr :is(th, td) {
  width: 100%;
  text-align: left;
  vertical-align: middle;
}

table.contact-table tr td {
  padding-bottom: 0.5em;
  border-bottom: 1px solid #ccc;
}

table.contact-table tr th {
  position: relative;
  font-weight: bold;
}

table.contact-table tr th::before {
  display: inline-block;
  padding-right: 0.1em;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f0c8";
}

table.contact-table tr th:has(+ td [data-req="req"])::after {
  position: absolute;
  top: 50%;
  display: inline-block;
  padding: 0 5px;
  margin: 0 0 0 5px;
  font-size: 0.7em;
  color: white;
  content: "必須";
  background-color: hsl(10 96% 37% / 100%);
  transform: translateY(-50%);
}

table.contact-table input[type="radio"][name="校舎"] + label {
  display: inline-block;
  width: fit-content;
  padding: 0 1em;
  line-height: 3em;
  border: 1px solid black;
  border-radius: 6px;
}

table.contact-table input[type="radio"][name="校舎"]:checked + label {
  color: white;
  background-color: hsl(var(--color-primary-light));
  border: 1px solid hsl(var(--color-primary-light));
}

@media (min-width: 768px) {
  table.contact-table {
    border-collapse: collapse;
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
  }

  table.contact-table tr {
    display: table;
    width: 100%;
    margin-bottom: 0;
  }

  table.contact-table tr :is(th, td) {
    padding: 0.5em;
    vertical-align: middle;
    border-right: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
  }

  table.contact-table tr th {
    position: relative;
    width: 12em;
    background-color: #eee;
  }

  table.contact-table tr td {
    width: auto;
  }

  table.contact-table tr th::before {
    display: none;
  }

  table.contact-table tr th:has(+ td [data-req="req"])::after {
    top: 50%;
    right: 0.5em;
    transform: translateY(-50%);
  }
}

form#contact :is(select, input:not([type="button"])) {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
}

form#contact select {
  color: black;
  cursor: pointer;
}

form#contact textarea {
  display: block;
  width: 100%;
  height: 8.2em;
  padding: 0.5em 0.3em;
  line-height: 1.2em;
  resize: none;
  border: 1px solid #ccc;
  border-radius: 3px;
}

:is(input, textarea)::placeholder {
  color: gray;
}

form#contact input:is([type="radio"], [type="checkbox"]) {
  display: none;
}

form#contact label {
  cursor: pointer;
}

form#contact label.radio {
  display: inline-block;
  min-width: 5em;
  padding: 0.5em 0.3em;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 3px;
}

form#contact input[type="radio"]:checked + .radio {
  color: white;
  background-image: linear-gradient(to bottom, #003b90, #181a6b);
}

form#contact label.check::before {
  font-family: "Font Awesome 5 Free";
  content: "\f0c8";
}

form#contact input[type="checkbox"]:checked + .check::before {
  content: "\f14a";
}

form#contact input:is([type="submit"], [type="button"]) {
  display: block;
  width: 50%;
  padding: 0.5em 0;
  margin: 0.2em auto;
  font: inherit;
  font-weight: bold;
  color: white;
  text-align: center;
  cursor: pointer;
  background-color: hsl(var(--color-primary-light));
  border: none;
  border-radius: 0.3em;
  transition: opacity 0.5s;
}

form#contact input:is([type="submit"], [type="button"]):hover {
  opacity: 0.7;
}

form#contact input:is([type="submit"], [type="button"]):disabled {
  cursor: default;
  background-color: gray;
}

form#contact input:is([type="submit"], [type="button"]):disabled:hover {
  opacity: 1;
}

.error-mes {
  display: none;
  font-size: 0.8em;
  font-weight: bolder;
  color: hsl(10 96% 37% / 100%);
}

.show {
  display: block;
}

.items-schedule {
  display: inline-block;
  padding-right: 1em;
  line-height: 3em;
}

.error-color {
  background-color: hsl(10 96% 80% / 15%);
}

form#contact .contact-subitems {
  margin: 0.5em 0;
}

form#contact select.date-items {
  width: 9em;
}

form#contact select.time-items {
  width: 9em;
}

.input-attension {
  font-size: 0.8em;
  color: hsl(var(--color-primary-light));
}

.items-schoolinfo {
  margin-top: 0.5em;
  font-size: 0.8em;
  color: hsl(var(--color-primary-light));
}

form#contact input[type="text"]:focus {
  border-color: hsl(var(--color-primary));
  outline: none;
  box-shadow: inset 0 0 10px 4px hsl(var(--color-primary) / 25%);
  transition: 0.2s;
}

/* ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ AGREE-BOX */
.agree-box {
  width: 100%;
  margin-bottom: 1em;
  text-align: center;
}

.agree-inner {
  display: inline-flex;
  gap: 0.5em;
  align-items: center;
}

.agree-icon {
  font-family: "Font Awesome 5 Free";
  font-size: 1.5em;
  font-weight: 400;
  line-height: 1;
  color: gray;
  cursor: pointer;
  user-select: none;
}

.agree-icon::before {
  content: "\f0c8";
}

.agree-icon.checked::before {
  font-weight: 900;
  color: hsl(var(--color-primary-light));
  content: "\f14a";
}

.agree-text {
  font-size: 1em;
}

.agree-text a {
  color: hsl(var(--color-primary-light));
  text-decoration: underline;
}

.agree-text a:hover {
  color: gray;
}
