/* ===========================
    reset
============================== */
input[type="radio"],
input[type="checkbox"] {
  position: absolute;
  white-space: nowrap;
  width: 1px;
  height: 1px;
  overflow: hidden;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  margin: -1px;
}

select {
  -webkit-appearance: none; /* 1 */
  appearance: none;
}

a {
  background-color: transparent;
  text-decoration: none;
  color: inherit;
}

/* ===========================
    base
============================== */
:root {
  --c-form-color: #00aeba;
  --main-bg-color:#fff;
}
/* ===========================
    layout
============================== */
.l-main.is-page {
  padding: 0 0 10vh;
}
.l-main.is-form {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 0 10vh;
}
/* ===========================
    Project
============================== */
.p-header.is-page {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  height: 30vh;
}

.p-header.is-form {
  display: grid;
  place-items: center;
  margin-top: max(calc(120 / 1500 * 100vw), 80px);
  margin-bottom: 37px;
  margin-left: auto;
  margin-right: auto;
  height: auto;
  max-width: 80%;
}

/* p-form
-------------------- */
.p-form {
  margin: 0 auto;
  position: relative;
  padding: 0 1rem;
  line-height: 1.6;
}
@media (min-width: 768px) {
  .p-form {
    padding: 0 4rem;
  }
}
/* p-present-list
-------------------- */
.p-present-list {
  display: grid;
  font-size: 1rem;
  counter-reset: item;
  gap: 20px min(33/1500 * 100vw, 33px);
}

@media (min-width: 640px) {
  .p-present-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
.p-present-list li {
  position: relative;
  max-width: 273px;
  margin-left: auto;
  margin-right: auto;
}
.p-present-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  counter-increment: item;
  content: counter(item, upper-alpha);
  --size: 42px;
  width: var(--size);
  height: var(--size);
  background: var(--negative-bg-color);
  color: #fff;
  display: grid;
  place-items: center;
  border-radius: 3px;
}
.p-present-list .img img {
  border-radius: 4px;
}

.p-present-list .title {
  font-weight: bold;
  margin: 8px 0;
}

/* ===========================
    component
============================== */
.c-box {
  border: 2px solid var(--c-form-color);
  border-radius: 3px;
  margin: 40px 0 20px;
  background: #fff;
  --py: 20px;
  --px: 20px;
  padding: var(--py) 20px;
}
@media (min-width: 768px) {
  .c-box {
    --py: 45px;
    --px: 50px;
    padding: var(--py) var(--px);
  }
}
.c-box_title {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-form-color);
  color: #fff;
  margin: calc(-1 * var(--py)) calc(-1 * var(--px));
  margin-bottom: var(--py);
  padding: 5px 15px;
  text-align: center;
  font-weight: bold;
}
.c-box_title::before {
  content: "\\";
  margin-right: 0.5em;
}
.c-box_title::after {
  content: "/";
  margin-left: 0.5em;
}
.c-tag {
  padding: 0.5em;
  display: inline-block;
  background: var(--c-form-color);
  color: #fff;
  font-size: calc(19.2rem / 16);
  border-radius: 3px;
}
.c-button-square {
  display: grid;
  place-items: center;
  width: min(100%, 400px);
  background: #fff;
  border: 1px solid #252525;
  font-weight: bold;
  border-radius: 4px;
  min-height: 70px;
  padding: 5px 15px;
  transition-property: background-color, color, border-color;
  transition-duration: 0.3s;
  margin: 60px auto 0;
  font-size: calc(19rem / 16);
  font-weight: normal;
}
.c-button-square:hover {
  border-color: var(--c-form-color);
  background: var(--c-form-color);
  color: #fff;
}

/* form */
/* ============================================ */
.c-form-box {
  background: #fff;
  border-radius: 4px;
  border: solid 1px #ddd;
  padding: clamp(30px,68/1500 * 100vw, 68px) min(80/1500 * 100vw, 80px) clamp(30px,80/1500 * 100vw, 80px);
  font-size: 1rem;
}

.c-form-list label {
  display: block;
}
.c-form-list select {
  background: url(../img/present-form/icon_down.png) no-repeat center right
    12px / auto;
  font-weight: 600;
}
.c-form-list input[type="password"],
.c-form-list input[type="text"],
.c-form-list input[type="email"],
.c-form-list input[type="tel"],
.c-form-list textarea,
.c-form-list select {
  border: 1px solid #ddd;
  padding: 0.5em 0.85em;
  min-height: 60px;
  width: 100%;
  background-color: #f7f7f7;
  border-radius: 4px;
}

.c-form-list select[name="age"] {
  max-width: 90px;
}
.c-form-list .--short {
  max-width: 420px;
}
.c-form-list textarea {
  min-height: 240px;
  resize: vertical;
}
.c-form-list ::placeholder {
  color: #999;
}

.c-form-title {
  display: flex;
  align-items: center;
  font-weight: bold;
  padding-bottom: 22px;
}
.c-form-title .c-form-required,
.c-form-title .c-form-any {
  margin-right: 7px;
}

.c-form-content {
  margin-top: 20px;
  display: flex;
  flex-flow: column;
}

.c-zip-wrapper {
  display: flex;
  gap: 0.9em;
  align-items: center;
  flex-flow: wrap;
}
.c-zip-wrapper input[type="text"] {
  width: 140px;
}

.c-zip-button {
  min-height: 33px;
  background: #252525;
  border-radius: 3px;
  display: grid;
  place-items: center;
  padding: 5px 13px;
  color: #fff;
  font-weight: bold;
}

.c-form-required,
.c-form-any {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  min-width: 38px;
  line-height: 1;
  color: #fff;
  font-size: calc(12rem / 16);
  flex-shrink: 0;
  background: #999;
  font-weight: normal;
  border-radius: 2px;
}

.c-form-required {
  background: #f84907;
}

.c-form-radio,
.c-form-checkbox {
  counter-reset: item;
}

.c-form-acceptance{
  line-height: 2;
}

.c-form-checkbox label,
.c-form-radio label,
.c-form-acceptance label {
  display: block;
  border: 1px solid #ddd;
  background: #f7f7f7;
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.c-form-acceptance label {
  min-height: 68px;
  padding: 5px 15px;
  display: grid;
  place-items: center;
  margin-top: 15px;
}

.c-form-checkbox label,
.c-form-radio label {
  min-height: 60px;
  counter-increment: item;
}

.c-form-checkbox label + label,.c-form-radio label + label{
  margin-top: 10px;
}

.c-form-checkbox input[type="checkbox"] + span,
.c-form-acceptance input[type="checkbox"] + span {
  display: grid;
  grid-template-columns: min-content 1fr;
  gap: 10px;
  align-items: center;
  height: 100%;
  word-break: keep-all;
}
.c-form-checkbox input[type="checkbox"] + span::before,
.c-form-acceptance input[type="checkbox"] + span::before {
  grid-area: 1/1;
  content: "";
  display: inline-block;
  --size: 28px;
  width: var(--size);
  height: var(--size);
  border: 1px solid #e0dfe4;
  background: #fff;
}
.c-form-checkbox input[type="checkbox"] + span::after,
.c-form-acceptance input[type="checkbox"] + span::after {
  grid-area: 1/1;
  content: "\2714";
  display: grid;
  place-items: center;
  font: var(--fa-font-solid);
  color: transparent;
  justify-self: center;
  transition: color 0.3s;
}
.c-form-checkbox input[type="checkbox"]:checked + span::after,
.c-form-acceptance input[type="checkbox"]:checked + span::after {
  color: var(--c-form-color);
}

.c-form-radio input[type="radio"] + span {
  display: grid;
  grid-template-columns: min-content auto;
  grid-template-areas:
    "button img"
    "button content";
}

@media (min-width: 768px) {
  .c-form-radio input[type="radio"] + span {
    grid-template-columns: min-content auto auto;
    grid-template-areas: "button content img";
  }
}

.c-form-radio input[type="radio"] + span .content {
  padding: 20px clamp(0.625rem, 0.179rem + 2.23vw, 1.25rem) 20px;
  border-left: 1px solid #ddd;
  grid-area: content;
}

@media (min-width: 768px) {
  .c-form-radio input[type="radio"] + span .content {
    padding: 40px 30px;
  }
}

.c-form-radio input[type="radio"] + span .title {
  font-weight: bold;
  display: flex;
  margin-bottom: 20px;
  gap: 5px;
}
@media (min-width: 768px) {
  .c-form-radio input[type="radio"] + span .title{
  gap: 16px;
  }
}

.c-form-radio input[type="radio"] + span .title::before {
  content: counter(item, upper-alpha);
  font-size: calc(16.7rem / 16);
  color: #fff;
  display: grid;
  place-items: center;
  --size: 26px;
  width: var(--size);
  height: var(--size);
  background: #252525;
  flex-shrink: 0;
  margin-top: 0.2em;
}
.c-form-radio input[type="radio"] + span .img {
  grid-area: img;
  padding: 20px clamp(0.625rem, 0.179rem + 2.23vw, 1.25rem) 0;
  border-left: 1px solid #ddd;
}

@media (min-width: 768px) {
  .c-form-radio input[type="radio"] + span .img {
    padding: 30px 40px 30px 0;
    border-left: none;
  }
}
.c-form-radio input[type="radio"] + span img {
  border-radius: 1px;
  width: 100%;
  object-fit: cover;
  aspect-ratio: 160/107;
  max-width: 160px;
}
.c-form-radio input[type="radio"] + span::before,
.c-form-radio input[type="radio"] + span::after {
  content: "";
  display: inline-block;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  grid-area: 1/1;
  background: #fff;
  margin: 0 8px;
  align-self: center;
  transition: background-color 0.3s;
  grid-area: button;
}

@media (min-width: 768px) {
  .c-form-radio input[type="radio"] + span::before,
  .c-form-radio input[type="radio"] + span::after {
    margin: 0 15px;
  }
}
.c-form-radio input[type="radio"] + span::before {
  --size: 28px;
  border: 1px solid #ddd;
}
.c-form-radio input[type="radio"] + span::after {
  --size: 14px;
  justify-self: center;
}
.c-form-radio input[type="radio"]:checked + span::after {
  background: var(--c-form-color);
}

.c-form-button {
  display: grid;
  place-items: center;
  width: min(100%, 400px);
  background: #fff;
  border: 1px solid #252525;
  font-weight: bold;
  border-radius: 4px;
  min-height: 70px;
  padding: 5px 15px;
  font-weight: bold;
  transition-property: background-color, color, border-color;
  transition-duration: 0.3s;
  margin: 60px auto 0;
  font-size: calc(19rem / 16);
}
.c-form-button:hover {
  border-color: var(--c-form-color);
  background: var(--c-form-color);
  color: #fff;
}

.c-form-button input {
  position: absolute;
  white-space: nowrap;
  width: 1px;
  height: 1px;
  overflow: hidden;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  margin: -1px;
}

.c-error-message{
  font-size: calc(15rem / 16);
  font-weight: bold;
  color: red;
  margin-top: 5px;
}

/* ===========================
    Utility
============================== */
.u-fz22 {
  font-size: calc(22rem / 16);
}
.u-fz13 {
  font-size: calc(13rem / 16);
}
.u-fz17 {
  font-size: calc(17rem / 16);
}
.u-font-bold {
  font-weight: bold;
}
.u-w-fit {
  width: fit-content;
}
.u-mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.u-mt90 {
  margin-top: 90px;
}
.u-mt30 {
  margin-top: 30px;
}
.u-mt40 {
  margin-top: 40px;
}
.u-link {
  text-decoration: underline 1px;
  text-underline-offset: 0.5em;
  font-weight: bold;
}
.u-wbr {
  word-break: keep-all;
  overflow-wrap: anywhere;
}
