@charset "Shift_JIS";

/* モーダルトリガーボタン */
.modal_trigger {
  display: block;
  margin: 20px auto;
  padding: 12px 24px;
  background-color: #FBFAFA;
  color: #000;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal_trigger:hover {
  opacity: 0.5;
}

/* モーダル本体 */
.adm_dynamic_modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.adm_dynamic_modal.is_active {
  opacity: 1;
  visibility: visible;
}

/* モーダルオーバーレイ */
.adm_modal_overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

/* モーダルコンテンツ */
.adm_modal_content {
  position: relative;
  background-color: #fff;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  z-index: 10000;
}

.adm_dynamic_modal.is_active .adm_modal_content {
  transform: scale(1);
}

/* 閉じるボタン */
.adm_modal_close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10001;
}

.adm_modal_close:hover {
  color: #A87840;
}

/* モーダルボディ */
.adm_modal_body {
  padding: 60px 40px 40px;
}

.adm_modal_body h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 24px;
  color: #333;
}

.adm_modal_body p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #666;
}

/* モーダルコンテンツ */
.adm_items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.adm_item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.adm_item_inner {
  opacity: 1;
  transition: opacity .3s ease;
  -webkit-transition: opacity .3s ease;
  -moz-transition: opacity .3s ease;
  -ms-transition: opacity .3s ease;
  -o-transition: opacity .3s ease;
}
.adm_item_inner:hover  {
  text-decoration: none;
  opacity: .7;
}
.adm_item_img {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  img {
    flex-shrink: 0;
    text-align: center;
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
  }
}
.adm_item_name {
  display: grid;
  grid-template-columns: 1fr 15px;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  text-align: left;
  &::after {
    content: '';
    display: block;
    width: 15px;
    aspect-ratio: 1 / 1;
    background-image: url(/img/usr/freepage/study/icon_arrow.png);
    background-repeat: no-repeat;
    background-size: contain;
  }
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .adm_modal_content {
    width: 90%;
    max-height: 70vh;
    margin-top: 20vh;
  }

  .adm_modal_body {
    padding: 50px 20px 20px;
  }

  .adm_modal_body h3 {
    font-size: 20px;
  }

  .adm_items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}
