@import url("base.css");
@import url("animation.css");

/* 일반 Dialog */
.dialog {
  width: 100%;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: none;
  opacity: 0;
  align-items: center;
  justify-content: center;
}
.dialog.dialog--open {
  animation: fadeIn var(--animation-duration);
  opacity: 1;
}
.dialog.dialog--open .dialog-container {
  animation: bounceIn var(--animation-duration) ease;
}
.dialog.dialog--close {
  animation: fadeOut var(--animation-duration);
}
.dialog.dialog--close .dialog-container {
  animation: bounceOut var(--animation-duration) ease;
}
.dialog button {
  background: none;
  width: auto;
}
.dialog-container {
  width: 90%;
  height: auto;
  border-radius: 12px;
  background: var(--white-color);
  padding: 25px;
  box-sizing: border-box;
}
.dialog__close {
  text-align: right;
}
.dialog__close button {
  padding: 10px;
  display: inline-block;
}
.dialog__title,
.dialog__sub-title {
  text-align: center;
}
.dialog__title p {
  line-height: 35px;
  font-weight: 600;
  font-size: 24px;
}
.dialog__sub-title p {
  line-height: 24px;
  font-weight: 500;
  font-size: 16px;
}
.dialog__image {
  margin: 15px auto;
  text-align: center;
  position: relative;
  width: fit-content;
}
.dialog__image img {
  width: 100%;
}
.dialog__image .dialog__result-count {
  position: absolute;
  left: 50%;
  top: 44%;
  font-weight: 800;
  font-size: 66px;
  color: #232221;
  transform: translate(-50%, -50%);
}
.dialog__image .dialog__result-score {
  width: 115px;
  text-align: center;
  position: absolute;
  left: 130px;
  top: 120px;
  font-weight: 800;
  font-size: 35px;
  color: #232221;
  background: linear-gradient(90deg, #ffffff 0%, #e4e3ea 100%);
  border-radius: 3px;
  transform: translate(-50%, -50%);
}
.dialog__action-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 15px;
}
.dialog__action-buttons button {
  width: 90%;
  font-weight: 700;
  font-size: 15px;
  color: #bcb5ad;
  border: 2px solid #bcb5ad;
  box-sizing: border-box;
  padding: 10px 0;
  border-radius: 50px;
}
.dialog__action-buttons .primary {
  background: var(--accent-color);
  border: 2px solid var(--accent-color);
  box-shadow: 0px 4px 12px 1px #00000026;
  color: var(--white-color);
}
.dialog__action-buttons .success {
  background: #93c44b;
  border: 2px solid #93c44b;
  box-shadow: 0px 4px 12px 1px #00000026;
  color: var(--white-color);
}
.dialog-quiz-status {
  width: 90%;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 35px;
}
.dialog-quiz-status .divider {
  width: 2px;
  min-height: 55px;
  background: #f2f0ef;
}
.dialog-quiz-status__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: var(--small-font-size);
  color: #bcb5ad;
  row-gap: 10px;
}
.dialog-quiz-status__content .medal-image {
  width: 20px;
}
.dialog-quiz-status__content .score {
  font-size: var(--large-font-size);
  color: var(--accent-color);
}
.dialog-quiz-status__content .point {
  display: flex;
  align-items: center;
  column-gap: 5px;
  font-size: var(--large-font-size);
  color: #ffd041;
}

/* Level Up Dialog */
.level-up-dialog .dialog-container {
  background: url("../src/level_up.gif") center no-repeat;
  height: 500px;
  width: 312px;
  background-size: contain;
  border-radius: 29px;
  box-sizing: inherit;
}
.level-up-dialog .dialog__title {
  position: relative;
  margin-bottom: 60px;
  z-index: 100;
}
.level-up-dialog .dialog__content {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  font-weight: 800;
  font-size: 35px;
  column-gap: 5px;
  margin-bottom: 310px;
}
.level-up-dialog .dialog__image {
  display: flex;
  justify-content: center;
}
.level-up-dialog .dialog__image-wrapper {
  width: fit-content;
  position: relative;
}
.level-up-dialog .dialog__image .star1 {
  position: absolute;
  left: -65px;
  transform: scale(0.6) rotate(53deg);
}
.level-up-dialog .dialog__image .star2 {
  position: absolute;
  right: -80px;
  bottom: 40px;
  transform: scale(0.8) rotate(65deg);
}
.level-up-dialog .dialog__image .star3 {
  position: absolute;
  left: -70px;
  bottom: -20px;
}
.level-up-dialog .dialog__image .up_blue {
  position: absolute;
  right: -80px;
  top: 30px;
}
.level-up-dialog .dialog__image .up_green {
  position: absolute;
  bottom: -110px;
}

/* Medal Guide Popup */
.medal-guide-popup .dialog-container {
  padding-bottom: 50px;
}
.medal-guide-popup .dialog__sub-title {
  margin-top: 13px;
  margin-bottom: 25px;
}
/* Medal Guide Popup - Medal Step */
.medal-guide-popup .dialog__content {
  position: relative;
}
.medal-guide-popup .dialog__content .medal-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(188, 181, 173, 0.2);
}
.medal-guide-popup .dialog__content .medal-step .point {
  color: rgba(35, 34, 33, 0.4);
  font-weight: 500;
  font-size: 12px;
  position: relative;
  bottom: -28px;
  background: white;
  padding-right: 10px;
  box-sizing: border-box;
}
.medal-guide-popup .dialog__content .medal-step .medal-info {
  display: flex;
  align-items: center;
  column-gap: 8px;
  font-size: 12px;
  font-weight: 500;
  min-width: 100px;
}
.medal-guide-popup .dialog__content .medal-step .medal-info img {
  width: 28px;
  height: 28px;
}
/* Medal Guide Popup - Progress bar & 나의 별 포인트 */
.medal-guide-popup .dialog__content .progress-bar {
  height: 0;
  max-height: 100%;
  position: absolute;
  right: 120px;
  transform: translateX(-50%);
  bottom: 0;
  background: var(--accent-color);
  width: 6px;
  border-radius: 50px;
  transition: 1s;
}
.medal-guide-popup .dialog__content .progress-bar-detail {
  position: absolute;
  min-width: 75px;
  right: 20px;
  padding: 12px;
  bottom: 0;
  background: var(--white-color);
  box-shadow: 9px 2px 35px 6px #ff800033;
  border-radius: 12px;
}
.medal-guide-popup .dialog__content .progress-bar-detail::after {
  content: "";
  width: 0;
  height: 0;
  border-bottom: 10px solid transparent;
  border-top: 10px solid transparent;
  border-left: 12px solid #ffff;
  border-right: 8px solid transparent;
  right: -18px;
  top: 50%;
  position: absolute;
  transform: translateY(-50%);
}
.medal-guide-popup .dialog__content .progress-bar-detail__title {
  font-size: 12px;
  color: rgba(35, 34, 33, 0.4);
  min-width: 110px;
}
.medal-guide-popup .dialog__content .progress-bar-detail__point {
  display: flex;
  align-items: center;
}
.medal-guide-popup .dialog__content .progress-bar-detail__point img {
  width: 13px;
  height: 12px;
}
.medal-guide-popup .dialog__content .progress-bar-detail__point span {
  font-weight: 600;
  font-size: 15px;
  color: var(--accent-color);
}

/* Event Popup */
.event-popup .dialog__title {
  margin-bottom: 25px;
}
.event-popup .dialog__title img {
  margin-bottom: 15px;
}
.event-popup .dialog__content p {
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  line-height: 24px;
}

/* Validate Alert */
.validate-alert {
  position: fixed;
  left: 50%;
  bottom: 110px;
  width: max-content;
  z-index: 90;
  transform: translateX(-50%);
  box-shadow: 0px 2px 12px 0px #ff383833;
  padding: 12px 16px;
  background: var(--white-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  column-gap: 10px;
  font-weight: 600;
  font-size: 13px;
  color: #ff3838;
  visibility: hidden;
  transform-origin: left;
}
.validate-alert.open {
  animation: bounceInForAlert var(--animation-duration);
  visibility: visible;
}
.validate-alert.close {
  animation: bounceOutForAlert var(--animation-duration);
}
.quiz-validate-alert > img {
  animation: fadeOut 0.4s infinite alternate;
}