@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&family=Merriweather:opsz,wght@18..144,700&display=swap');

:root {
  --page-background: #d0cbf3;
  --primary-button: #7a58f4;
  --white: #fff;
  --dialog-main: #1a1832;
  --rate-button: #1a2036;
  --rate-button-line: #2e3650;
  --rate-button-letter: #b1b9d8;
  --rate-info: #e7e7e7;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--page-background);
  min-width: 450px;
}

main {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.accept-button {
  background-color: var(--primary-button);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  border-radius: 5px;
  border: none;
  width: 144px;
  height: 44px;
  border: none;
  cursor: pointer;
  outline: none;
}

.main-content span {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 400;
  height: 33px;
  width: 100%;
  padding-top: 20px;
  text-align: center;
}

.dialog {
  /* display: none; */
  position: fixed;
  top: calc(50% - 222px);
  left: calc(50% - 460px);
  width: 920px;
  height: 444px;
  border: none;
  border-radius: 20px;
  background-color: var(--dialog-main);
  /* display: flex; */
  flex-direction: column;
  box-shadow: 0px 10px 25px -15px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  opacity: 0;
  scale: 0.01;
  transition:
    opacity 0.25s ease-out,
    scale 0.25s ease-in-out;
}

.dialog.active {
  opacity: 1;
  scale: 1;
}

.dialog::backdrop {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.dialog.active::backdrop {
  opacity: 1;
}

.close-button-container {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  background-color: var(--dialog-main);
  padding: 18px;
}

.close-button-container svg {
  cursor: pointer;
}

h1 {
  text-align: center;
  color: var(--white);
  font-family: 'Merriweather', serif;
  font-size: 26px;
  font-weight: 700;
  padding: 3px 150px;
  line-height: 1.3;
  letter-spacing: 0.3px;
}

.rate-buttons {
  width: calc(100% - 104px);
  display: flex;
  justify-content: space-between;
  margin-top: 64px;
  margin-inline: 52px;
}

.rate-button {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background-color: var(--rate-button);
  outline: 1px solid var(--rate-button-line);
  border: none;
  box-shadow: 0px 10px 25px -15px #111628;
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--rate-button-letter);
  outline: 1px solid var(--rate-button-line);
  cursor: pointer;
}

.numbered {
  text-shadow:
    -0.5px -0.5px 0 var(--rate-button-letter),
    0.5px -0.5px 0 var(--rate-button-letter),
    -0.5px 0.5px 0 var(--rate-button-letter),
    0.5px 0.5px 0 var(--rate-button-letter);
  outline-color: var(--rate-button-letter);
}

.rate-button:hover {
  text-shadow:
    -0.5px -0.5px 0 var(--rate-button-letter),
    0.5px -0.5px 0 var(--rate-button-letter),
    -0.5px 0.5px 0 var(--rate-button-letter),
    0.5px 0.5px 0 var(--rate-button-letter);
  outline-color: var(--rate-button-letter);
}

.rate-labels {
  width: calc(100% - 104px);
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  margin-inline: 52px;
}

.rate-labels span {
  color: var(--rate-info);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
}

.main-buttons {
  width: calc(100% - 104px);
  display: flex;
  justify-content: space-between;
  margin-top: 63px;
  margin-inline: 52px;
}

.cancel-button {
  background-color: #1a1832;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  border-radius: 5px;
  border: none;
  width: 144px;
  height: 44px;
  border: 1px solid #7a58f4;
  cursor: pointer;
}

@media (max-width: 980px) {
  .dialog {
    opacity: 1;
    scale: 100%;
    /* ------------ */
    position: fixed;
    top: calc(50% - 222px);
    left: calc(100vw * 0.05);
    width: 90%;
    height: fit-content;
    border-radius: 10px;
    min-width: 450px;
  }
  .close-button-container {
    padding: 14px;
  }
  .close-button-container svg {
    scale: 0.8;
  }
  .h1container {
    display: flex;
    justify-content: center;
  }
  h1 {
    font-size: 20px;
    padding: 0;
    width: 70%;
    text-align: center;
    line-height: 1.7;
    letter-spacing: 1px;
  }
  .rate-buttons {
    width: calc(100% - 80px);
    margin-top: 30px;
    margin-inline: 40px;
    gap: 8px;
  }
  .rate-button {
    width: max(calc((100vw - 152px) / 10), 20px);
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    font-size: 24px;
  }
  .rate-labels {
    width: calc(100% - 80px);
    margin-top: 12px;
    margin-inline: 40px;
  }
  .rate-labels span {
    font-size: 11px;
  }
  .main-buttons {
    width: calc(100% - 80px);
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    margin-bottom: 30px;
    margin-inline: 40px;
  }
}
