/* 
 * JumClass Custom Modal Component
 * 점클래스 커스텀 모달 컴포넌트
 */

/* ===== body 스크롤 방지 ===== */
body.jumclass-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ===== 모달 오버레이 ===== */
.jumclass-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;  /* SweetAlert2보다 높게 설정 */
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.jumclass-modal-overlay.active {
  display: flex;
}

/* ===== 모달 컨테이너 ===== */
.jumclass-modal {
  position: relative;
  width: 320px;
  min-height: 180px;
  height: auto;
  max-height: 90vh;
  overflow-y: auto;
  background: #191919;
  border-radius: 20px;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  animation: slideUp 0.3s ease;
  box-sizing: border-box;
}

/* ===== 모달 컨텐츠 영역 ===== */
.jumclass-modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0px;
  gap: 20px;
  width: 256px;
  height: auto;
  flex: 1 1 auto;
}

/* ===== 아이콘 영역 ===== */
.jumclass-modal__icon {
  width: 48px;
  height: 48px;
  position: relative;
  flex: none;
  flex-grow: 0;
}

/* 경고 아이콘 */
.jumclass-modal__icon--warning {
  position: relative;
}

.jumclass-modal__icon--warning::before {
  content: '';
  position: absolute;
  width: 39.75px;
  height: 39.75px;
  left: calc(50% - 39.75px/2);
  top: calc(50% - 39.75px/2);
  background: #802FFF;
  border-radius: 50%;
}

.jumclass-modal__icon--warning::after {
  content: '';
  position: absolute;
  left: calc(50% - 2px);
  top: 12.25px;
  width: 4px;
  height: 17px;
  background: #FFFFFF;
  border-radius: 1px;
}

.jumclass-modal__icon--warning .jumclass-modal__icon-dot {
  position: absolute;
  left: calc(50% - 2px);
  top: 32.38px;
  width: 4px;
  height: 4px;
  background: #FFFFFF;
  border-radius: 1px;
}

/* ===== 모달 제목 ===== */
.jumclass-modal__title {
  width: 256px;
  height: auto;
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 140%;
  /* identical to box height, or 20px */
  text-align: center;
  letter-spacing: -0.03em;
  color: #999999;
  margin: 0;
  flex: none;
  align-self: stretch;
  flex-grow: 0;
  white-space: pre-line;
}

/* ===== 모달 설명 텍스트 ===== */
.jumclass-modal__description {
  width: 256px;
  height: auto;
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 140%;
  /* identical to box height, or 20px */
  text-align: center;
  letter-spacing: -0.03em;
  color: #999999;
  margin: 0;
  flex: none;
  align-self: stretch;
  flex-grow: 0;
  white-space: pre-line;
}

/* ===== 정보 박스 ===== */
.jumclass-modal__info-box {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 12px 16px;
  gap: 10px;
  width: 100%;
  background: #292929;
  border-radius: 8px;
}

.jumclass-modal__info-text {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 500; /* 500으로 수정 */
  font-size: 16px; /* 16px로 수정 */
  line-height: 140%;
  letter-spacing: -0.03em;
  color: #FFFFFF; /* 기본 흰색 */
  text-align: left;
  white-space: pre-line;
  width: 100%;
}

/* 정보 박스 내 보라색 강조 텍스트 */
.jumclass-modal__info-text .jumclass-modal__purple {
  color: #A166FF;
  font-weight: 700;
}

/* 강조 텍스트 (기본) */
.jumclass-modal__highlight-text {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  line-height: 140%;
  text-align: center;
  letter-spacing: -0.03em;
  color: #A166FF;
  white-space: pre-line;
}

/* ===== 버튼 영역 ===== */
.jumclass-modal__buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0px;
  gap: 12px;
  width: 256px;
  min-height: 34px;
  height: auto;
  flex: none;
  flex-grow: 0;
}

/* ===== 버튼 스타일 ===== */
.jumclass-modal__button {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 7px 16px;
  gap: 8px;
  width: 122px;
  height: 34px;
  border: none;
  border-radius: 4px;
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  line-height: 140%;
  /* identical to box height, or 20px */
  text-align: center;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  flex: none;
  flex-grow: 0;
  box-sizing: border-box;
}

/* 기본 버튼 (회색) */
.jumclass-modal__button--default {
  background: #292929;
}

.jumclass-modal__button--default:hover {
  background: #3a3a3a;
}

/* 주요 버튼 (보라색) */
.jumclass-modal__button--primary {
  background: #802FFF;
}

.jumclass-modal__button--primary:hover {
  background: #9146ff;
}

/* 닫기 버튼 */
.jumclass-modal__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-size: 20px;
  transition: color 0.2s ease;
}

.jumclass-modal__close:hover {
  color: #FFFFFF;
}

/* ===== 애니메이션 ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== 모달 타입별 스타일 ===== */
/* 강의 재시작 모달 - 피그마 스펙 */
.jumclass-modal--restart {
  min-height: 199px;
}

.jumclass-modal--restart .jumclass-modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0px;
  gap: 20px;
  width: 256px;
  height: 85px;
  flex: none;
  order: 0;
  align-self: stretch;
  flex-grow: 0;
}

.jumclass-modal--restart .jumclass-modal__title {
  width: 256px;
  height: 25px;
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 700;
  font-size: 18px;
  line-height: 140%;
  text-align: center;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  flex: none;
  order: 0;
  align-self: stretch;
  flex-grow: 0;
}

.jumclass-modal--restart .jumclass-modal__description {
  width: 256px;
  height: 40px;
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 140%;
  text-align: center;
  letter-spacing: -0.03em;
  color: #999999;
  flex: none;
  order: 1;
  align-self: stretch;
  flex-grow: 0;
  white-space: pre-line;
}

/* 휴강 신청 모달 */
.jumclass-modal--cancel-class {
  min-height: 350px;
}

.jumclass-modal--cancel-class .jumclass-modal__content {
  height: auto;
}

.jumclass-modal--cancel-class .jumclass-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  height: auto;
}

/* 재수강 신청 모달 - 피그마 스펙 */
.jumclass-modal--re-enroll {
  min-height: 244px;
}

.jumclass-modal--re-enroll .jumclass-modal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0px;
  gap: 20px;
  width: 256px;
  height: 125px;
  flex: none;
  order: 0;
  align-self: stretch;
  flex-grow: 0;
}

.jumclass-modal--re-enroll .jumclass-modal__title {
  width: 256px;
  height: 25px;
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 700;
  font-size: 18px;
  line-height: 140%;
  text-align: center;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  flex: none;
  order: 0;
  align-self: stretch;
  flex-grow: 0;
}

.jumclass-modal--re-enroll .jumclass-modal__highlight-text {
  width: 256px;
  height: auto;
  min-height: 80px;
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 140%;
  text-align: center;
  letter-spacing: -0.03em;
  color: #999999;
  flex: none;
  order: 1;
  align-self: stretch;
  flex-grow: 0;
  white-space: pre-line;
}

/* 재수강 모달 내 보라색 강조 텍스트 */
.jumclass-modal--re-enroll .jumclass-modal__highlight-text span {
  color: #A166FF;
  font-weight: 700;
}

/* ===== 특정 모달의 스타일 ===== */

/* 휴강 신청 결과 모달 */
.jumclass-modal--result {
  min-height: 170px;
}

.jumclass-modal--result .jumclass-modal__content {
  height: auto;
}

.jumclass-modal--result .jumclass-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  height: auto;
}

.jumclass-modal--result .jumclass-modal__buttons {
  justify-content: center;
}

.jumclass-modal--result .jumclass-modal__button {
  width: 122px;
}

/* ===== 반응형 (모바일) ===== */
@media (max-width: 768px) {
  /* 모달 오버레이 - 모바일에서 더 어두운 배경 */
  .jumclass-modal-overlay {
    background: rgba(0, 0, 0, 0.5);
  }
  
  /* 모달 컨테이너 - 모바일 스타일 */
  .jumclass-modal {
    width: 304px;
    padding: 24px;
    gap: 24px;
    min-height: 160px;
    max-height: 85vh;
  }
  
  /* 모달 타이틀 - 모바일에서 더 크고 진한 폰트 */
  .jumclass-modal__title {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    height: auto;
  }
  
  /* 정보 박스 - 모바일 너비 조정 */
  .jumclass-modal__info-box {
    width: 232px;
    min-height: 64px;
    height: auto;
  }
  
  .jumclass-modal__info-text {
    width: 100%;
    height: auto;
  }
  
  /* 질문 텍스트 */
  .jumclass-modal__description {
    color: #999999;
  }
  
  /* 강조 텍스트 - 모바일에서 높이 조정 */
  .jumclass-modal__highlight-text {
    width: 256px;
  }
  
  /* 모달 타입별 모바일 조정 */
  /* 휴강 신청 모달 */
  .jumclass-modal--cancel-class {
    min-height: 340px;
  }
  
  .jumclass-modal--cancel-class .jumclass-modal__content {
    height: auto;
  }
  
  /* 휴강 신청 결과 모달 */
  .jumclass-modal--result {
    min-height: 160px;
  }
  
  .jumclass-modal--result .jumclass-modal__content {
    height: auto;
  }
  
  /* 강의 재시작 모달 */
  .jumclass-modal--restart {
    min-height: 180px;
  }
  
  .jumclass-modal--restart .jumclass-modal__content {
    height: auto;
  }
  
  /* 재수강 신청 모달 */
  .jumclass-modal--re-enroll {
    min-height: 210px;
  }
  
  .jumclass-modal--re-enroll .jumclass-modal__content {
    height: auto;
  }
  
  /* 일반 confirm/alert 모달 */
  .jumclass-modal:not([class*="jumclass-modal--"]) {
    min-height: 180px;
  }
  
  .jumclass-modal:not([class*="jumclass-modal--"]) .jumclass-modal__content {
    height: auto;
  }
}

/* 매우 작은 화면용 추가 조정 */
@media (max-width: 360px) {
  .jumclass-modal {
    width: calc(100% - 32px);
    max-width: 304px;
  }
}