/* 모달 스타일 */
#agreement-modal {
  display: none; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.5); 
  justify-content: center; 
  align-items: center; 
  z-index: 1001;
}

/* 모달 컨텐츠 */
.agreement-modal-inner {
  background: var(--bg-white);
  padding: 42px 0 42px 0;
  max-width: 642px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  position: relative;
  margin: 0 24px;
}

.agreement-modal-content {
  background: var(--bg-white);
  padding: 0 32px;
  position: relative;
  overflow-y: auto;
  max-height: 80vh;
  scrollbar-width: 6px;
  scrollbar-color: #999 transparent;
  overscroll-behavior: contain;
}

/* 닫기 버튼 */
.agreement-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

/* 모달 제목 */
#agreement-modal-title {
  font-size: 24px;
  margin-bottom: 24px;
  text-align: center;
}

/* 모달 내용 */
#agreement-modal-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-black);
}

#agreement-modal-body h3 {
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 12px;
}

#agreement-modal-body h3:first-child {
  margin-top: 0;
}

#agreement-modal-body p {
  font-size: 16px;
}

#agreement-modal-body p:last-child {
  margin-top: 16px;
}

#agreement-modal-body ul {
  padding-left: 20px;
  margin: 8px 0;
}

#agreement-modal-body li {
  margin-bottom: 4px;
}

/* 표 스타일 */
/* 표 스타일 - 컬럼 자동 균등 분배 (grid 활용) */
#agreement-modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  border: 0.5px solid #ddd; /* 표 외곽 테두리 */
  font-size: 16px;
}


#agreement-modal-body tr {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

#agreement-modal-body th {
  text-align: center;
}

#agreement-modal-body th, #agreement-modal-body td {
  border: 0.5px solid #ddd;
  padding: 10px 16px;
}

#agreement-modal-body th {
  background: var(--bg-grey-20);
  font-weight: 400;
}

#agreement-modal-confirm {
  margin-top: 24px;
}


/* 커스텀 연도 뷰 내 커스텀 스크롤 */
.agreement-modal-content::-webkit-scrollbar {
  width: 6px;
}

.agreement-modal-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.agreement-modal-content::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 3px;
}

.agreement-modal-content::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}

#agreement-modal-title-mobile {
  display: none;
}

/* 반응형 디자인 */
@media screen and (max-width: 689px) {
  .agreement-modal-content {
      flex: 1;
      min-height: 0;
      height: auto;
      max-height: none;
      overflow-y: auto;
	  padding: 0 16px;
  }

  .agreement-modal-inner {
      width: 100%;
      height: 100vh;
      height: 100dvh;
      max-width: none;
      max-height: none;
      margin: unset;
      display: flex;
      flex-direction: column;
  }

  #agreement-modal-title {
    display: none;
}

  #agreement-modal-title-mobile {
    text-align: center;
    padding: 10.5px;
    display: block;
    font-size: 18px;
    border-bottom: 1px solid #d7d7d7d7;
    margin-bottom: 16px;
  }

  .agreement-modal-close {
    top: 54px;
  }

  #agreement-modal .modal-footer {
    padding-bottom: 16px;
  }
}