/* ============================================================
  Modal
  body内に設置する汎用モーダル
============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal__inner {
  width: 100%;
  max-width: 900px;
  background: #fff;
  transform: translateY(-10px);
  transition: transform 0.2s ease;
}

.modal.is-open .modal__inner {
  transform: translateY(0);
}

/* ============================================================
Modal Header
============================================================ */
.modal__header {
  display: flex;
  align-items: center;
  min-height: 77px;
  padding: 0 22px;
  background: #333;
}

.modal__logo {
  width: 222px;
}

/* ============================================================
Modal Body
============================================================ */
.modal__body {
  padding: 32px;
  background: #fff;
}

.modal__title {
  font-size: 24px;
  font-weight: bold;
  line-height: 1.5;
  letter-spacing: 1%;
  margin: 0;
}

.modal__text {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 1%;
}

.modal__actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 131px;
  height: 50px;
  padding: 0 13px;
  border: 1px solid #626262;
  border-radius: 0;
  background: #EFEFEF;
  color: #333;
  font: inherit;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

.modal__close:hover {
  background: #eee;
}

.modal__close-icon {
  position: relative;
  width: 15px;
  height: 15px;
}

.modal__close-icon::before,
.modal__close-icon::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 18px;
  height: 2px;
  background: #333;
}

.modal__close-icon::before {
  transform: rotate(45deg);
}

.modal__close-icon::after {
  transform: rotate(-45deg);
}

/* ============================================================
SP
============================================================ */
@media screen and (max-width: 767px) {
  .modal {
    padding: 0 5px;
  }

  .modal__inner {
    max-width: none;
  }

  .modal__header {
    min-height: 42px;
    padding: 0 23px;
  }

  .modal__logo {
    width: 152px;
  }

  .modal__body {
    overflow: auto;
    padding: 24px;
  }

  .modal__title {
    font-size: 22px;
  }

  .modal__text {
    margin-top: 20px;
    font-size: 16px;
  }

  .modal__actions {
    margin-top: 20px;
  }

  .modal__close {
    min-width: 110px;
    height: 45px;
    gap: 15px;
    font-size: 18px;
  }

  .modal__close-icon::before,
  .modal__close-icon::after {
    width: 16px;
    height: 1.5px;
  }
}
