/**
 * GMS モーダル
 */

.gms-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;
}

.gms-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.gms-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

/* コンテンツ + 閉じるボタンをまとめるラッパー */
.gms-modal__wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100% - 40px);
  width: 860px;
  max-height: calc(100vh - 64px);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

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

.gms-modal__content {
  background: #fff;
  border: 2px solid var(--s-color-6595484e, #008c38);
  border-radius: 24px;
  width: 100%;
  overflow-y: auto;
  padding: 40px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

/* 右上の×ボタン（非表示） */
.gms-modal__close {
  display: none;
}

.gms-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gms-modal__icon {
  font-size: 32px;
  color: var(--s-color-6595484e, #008c38);
}

.gms-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--s-color-6595484e, #008c38);
  margin: 0;
}

.gms-modal__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 50px;
  width: 100%;
}

.gms-modal__tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--gms-color-gray-lighter);
  border-radius: 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.gms-modal__tag:hover {
  background: var(--s-color-6595484e, #008c38);
  color: #fff;
}

/* 下部の「閉じる」ボタン（コンテンツの外側） */
.gms-modal__close-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 200px;
  padding: 10px 20px;
  background: var(--s-color-6595484e, #008c38);
  color: #fff;
  border: none;
  border-radius: 0 0 10px 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.gms-modal__close-bottom .material-icons {
  font-size: 20px;
  color: #fff;
}

.gms-modal__close-bottom:hover {
  opacity: 0.9;
}

@media screen and (max-width: 540px) {
  .gms-modal__content {
    padding: 24px 16px;
    gap: 24px;
  }

  .gms-modal__wrapper {
    max-height: calc(100vh - 32px);
  }

  .gms-modal__title {
    font-size: 20px;
  }

  .gms-modal__icon {
    font-size: 24px;
  }

  .gms-modal__list {
    gap: 8px;
    padding: 0 10px;
  }

  .gms-modal__tag {
    padding: 6px 12px;
    font-size: 13px;
  }

  .gms-modal__close-bottom {
    width: 160px;
    padding: 8px 16px;
    font-size: 14px;
  }
}
