/**
 * お問い合わせ
 */

.contact-logo,
.contact-title,
.message,
.error,
.form *,
.contact-nav {
  box-sizing: border-box;
  color: rgb(30,25,20);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.required {
  color: rgb(200,0,0);
  font-weight: 700;
}

/* タイトル */
.contact-logo {
  margin: 0 0 1rem;
  padding: 0;
  width: auto;
}

.contact-logo img {
  display: block;
  margin: auto;
  max-width: 100%;
}

.contact-title {
  background: rgb(215,0,30);
  border-radius: 999rem;
  box-shadow: 0 1px rgb(150,0,0);
  color: #ffffff;
  display: table;
  font-size: 1.25rem;
  line-height: 2;
  margin: 0 auto 1rem;
  padding: 0 1em;
}

@media (min-width: 768px) {
  .contact-logo {
    display: none;
  }
}

/* 各種メッセージ */
.message {
  margin: 0 0 2rem;
  text-align: center;
}

.error {
  background: rgb(255,245,245);
  border: 1px solid rgb(225,0,50);
  border-radius: 0.25rem;
  color: rgb(225,0,50);
  margin-bottom: 2rem;
  padding: 1rem;
}

.error__title,
.error__text,
.error__list {
  margin: 0;
}

@media (min-width: 768px) {
  .message,
  .error {
    margin: 0 auto 2rem;
    width: 670px;
  }
}

/* フォーム */
.form {
  margin-bottom: 2rem;
}

.form .required {
  display: inline-block;
  text-align: center;
  width: 1rem;
}

@media (min-width: 768px) {
  .form {
    margin: 0 auto 2rem;
    width: 670px;
  }
}

/* ブランド・種別選択 */
.brand {
  background: linear-gradient(#ffffff,#ffffff) padding-box,
              url("../img/contact/brand-bg.png") 50%/2rem;
  border: 1rem solid transparent;
  margin-bottom: 1rem;
  padding: 1rem;
}

.brand input {
  position: absolute;
  z-index: -1;
}

.brand__title {
  margin: 0 0 1rem;
  text-align: center;
}

.brand__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: -0.25rem;
}

.brand__col {
  /* flex-grow: 1; */
  padding: 0.25rem;
  width: 50%;
}

.brand__label {
  align-items: center;
  border: 1px solid rgb(230,225,220);
  border-radius: 0.25rem;
  cursor: pointer;
  display: flex;
  /* height: 100%; */
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-align: center;
  transition: border 0.4s, box-shadow 0.4s;
}

.brand__label::before {
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

:focus + .brand__label {
  border-color: rgb(215,0,30);
  box-shadow: 0 0 0 0.25rem rgba(215,0,30,0.2);
}

:checked + .brand__label,
.brand__label:hover {
  border-color: rgb(215,0,30);
}

.brand__label img {
  display: block;
  flex-shrink: 0;
  margin: auto;
  max-width: 160px;
  width: 100%;
}

.brand__label span {
  display: block;
  font-weight: 700;
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .brand__col {
    width: calc(100% / 3);
    width: 15rem;
  }
}

/* 表組 */
.form__table {
  border-bottom: 1px solid rgb(160,150,140);
  border-collapse: collapse;
  margin-bottom: 1rem !important;
  width: 100%;
}

.form__table tr {
  display: flex;
  flex-direction: column;
}

.form__table th,
.form__table td {
  border: 1px solid rgb(160,150,140);
  border-bottom: none;
  padding: 0.5rem;
}

.form__table th {
  background: rgb(245,245,240);
  text-align: left;
}

@media (min-width: 768px) {
  .form__table tr {
    display: table-row;
  }
  .form__table th {
    width: 25%;
  }
}

/* フォーム部品 */
.form-text,
.form-select,
.form select,
.form-textarea {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgb(185,175,165);
  border-radius: 0.25rem;
  display: block;
  outline: none;
  padding: 0.5rem;
  transition: border 0.4s, box-shadow 0.4s;
  width: 100%;
}

.form-select,
.form select {
  background: url("../img/contact/form-select-icon.png") 100%/2rem no-repeat;
  padding-right: 2rem;
}

.form-text:focus,
.form-select:focus,
.form select:focus,
.form-textarea:focus {
  border-color: rgb(215,0,30);
  box-shadow: 0 0 0 0.25rem rgba(215,0,30,0.2);
}

.form select::-ms-expand {
  display: none;
}

:-ms-input-placeholder {
  color: rgb(180,175,170);
}

::-ms-input-placeholder {
  color: rgb(180,175,170);
}

::-webkit-input-placeholder {
  color: rgb(180,175,170);
}

::placeholder {
  color: rgb(180,175,170);
}

@media (min-width: 768px) {
  .size-20 { width: 20%; }
  .size-40 { width: 40%; }
  .size-60 { width: 60%; }
  .size-80 { width: 80%; }
  .form select { width: 40%; }
}

/* 送信ボタン */
.form__nav {
  display: flex;
  justify-content: center;
  margin: 0 -0.25rem;
}

.form__nav input {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background: rgb(245,245,240);
  border: none;
  border-radius: 0.25rem;
  box-shadow: 0 0.125rem rgb(220,220,215);
  cursor: pointer;
  display: block;
  font-weight: 700;
  margin: 0 0.25rem;
  outline: none;
  padding: 0.75rem;
  text-align: center;
  width: 50%;
}

.form__nav input:first-child {
  background: rgb(215,0,30);
  box-shadow: 0 0.125rem rgb(150,0,0);
  color: #ffffff;
}

@media (min-width: 768px) {
  .form__nav {
    margin: 0;
  }
  .form__nav input {
    width: 25%;
  }
}

/*  */
.contact-nav {
  text-align: center;
}

.contact-nav a {
  color: rgb(215,0,30);
  font-weight: 700;
}

/* スマホ対応 */
@media (max-width: 767px) {
  body {
    background: none;
  }
  #main {
    border: none;
    padding: 2rem 1rem;
    width: auto;
  }
  #main > * {
    display: none;
  }
  .contact-title {
    display: table !important;
  }
  .contact-logo,
  .message,
  .error,
  .form,
  .contact-nav {
    display: block !important;
  }
}
