/* ===== Modal Base ===== */
.c-modal[hidden]{ display:none; }

.c-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.c-modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .3s ease;
}

.c-modal__panel {
  position: relative;
  margin: 8vh auto;
  max-width: 840px;
  background: #F5F5F5;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  padding: 3rem;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
}

.c-modal__panel.membership {
  text-align: center;
  max-width: 540px;
}

.c-modal__hr{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 1px;
  height: 100%;
  border-right: solid 1px #E0E0E0;
}

.c-modal__close{
  position: absolute;
  top: 5px;
  right: 5px;
  width: 40px;
  height: 40px;
  font-size: 24px;
  line-height: 0px;
  padding: 0;
  color: #111; 
  cursor: pointer;
  border: none;
}

.c-modal__contents{
  display: flex;
  align-items: baseline;
  gap: 10%;
}

.c-modal__section {
  width: 50%;
}


/* heading */
.c-modal__heading {
  text-align: center;
  margin-bottom: 2rem;
}

.c-modal__heading h3 {
  display: inline-block;
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 700;
  border-bottom: solid 2px #CC0000;
  padding-bottom: 7px;
  margin-bottom: 1.5rem;
}

.c-modal__heading p {
  font-size: 13px;
  font-weight: lighter;
}


/* Grid of options */
.c-modal__grid{
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.c-modal__grid a {
  color: #1A1A1A;
}

/* Buttons */
.c-btn {
  display: grid;
  place-content: center;
  text-align: center;
  width: 100%;
  height: 60px;
  background: #FFF;
  border: 1px solid #E0E0E0;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  font-weight: 300;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .04s ease, background .15s ease, border-color .15s ease;
}
.c-btn:hover {
  background:#f1f5f9;
  border-color:#d1d5db; 
  color: inherit;
}

/* Body scroll lock when modal open */
.body--modal-open{
  overflow: hidden;
  touch-action: none;
}


/* 開いているときの状態 */
.c-modal.is-active .c-modal__overlay {
  opacity: 1;
}
.c-modal.is-active .c-modal__panel {
  opacity: 1;
  transform: translateY(0);
}

/* html {
  visibility: visible !important;
} */


@media screen and (max-width: 767px) {
  .c-modal__panel {
    margin: 1rem;
    padding: 2rem;
    overflow: scroll;
    scrollbar-width: none;
    height: 100%;
  }
  .c-modal__hr{
    display: none;
  }
  .c-modal__contents{
    flex-wrap: wrap;
  } 
  .c-modal__section {
    width: 100%;
  }
  .c-modal__section:first-of-type {
    border-bottom: 1px solid #ddd;
    padding-bottom: 2rem;
    margin-bottom: 3rem;
  }
}

.c-modal__title {
  text-align: center;
  margin-bottom: 2rem;
}

.c-modal__title h2 {
  display: inline-block;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  border-bottom: solid 2px #CC0000;
  padding-bottom: 7px;
  margin-bottom: 3rem;
}

.c-modal__title p {
  font-size: 13px;
  font-weight: lighter;
}
.c-modal__actions {
  margin-bottom: 2rem;
}

.c-modal__actions.c-btn {
  width: 100%;
}

.c-btn-member {
  background: #CC0000;
  font-size: 16px;
  color: #FFF;
  font-weight: bold;
  margin-bottom: .7rem;
}

.c-btn-nonmember {
  background: #747474;
  font-size: 16px;
  color: #FFF;
  font-weight: bold;
}

.attention-msg {
  border: solid 1px #E0E0E0;
  padding: 1rem 0;
}

.attention-msg p {
  font-size: clamp(12px, 1.4vw, 15px);
  font-weight: lighter;
  line-height: 1.4;
}

.attention-msg .red {
  color: #CC0000;
  font-weight: bold;
}

@media screen and (max-width: 767px) {
  .c-modal__panel.membership {
    height: auto;
  }
}

#consultation-modal .c-modal__panel {
  height: -webkit-fill-available;
}

#consultation-modal .c-modal__section {
  width: 100%;
  border-bottom: none;
}

@media screen and (min-width: 768px) {
  .d-md-none {
    display: none;
  }
}
