/* Start CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
  line-height: 1.1;
}

p {
  text-wrap: pretty;
}

textarea:not([rows]) {
  min-height: 10em;
}

:focus-visible {
  outline: 2px solid dodgerblue;
  outline-offset: 2px;
}

:target {
  scroll-margin-block-start: 5ex;
}
/* End CSS Reset */

/* Start Global Styles */
:root {
  --orange-500: #fb7413;
  --white: #ffffff;
  --grey-500: #959eac;
  --grey-900: #252d37;
  --grey-950: #121417;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: "Overpass", sans-serif;
  background-color: var(--grey-950);
  padding: 40px 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
  clip-path: inset(50%);
}

main {
  max-width: 25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--grey-900);
  border-radius: 15px;
}

.rating-component-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.8rem;
  gap: 1rem;
}

.star-img-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  background-color: #2e3641;
  border-radius: 50%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

fieldset {
  border: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

legend,
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
}

.rating-description,
.thanks-message {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--grey-500);
}

.rating-options {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.8rem 0;
}

.radio-input-option {
  position: relative;
}

.radio-input-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  top: 0;
  left: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.radio-input-option label {
  color: var(--grey-500);
  font-weight: 600;
  background-color: #2e3641;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.radio-input-option input[type="radio"]:hover + label {
  background-color: var(--orange-500);
  color: var(--grey-950);
}

.radio-input-option input[type="radio"]:checked + label {
  background-color: var(--white);
  color: var(--grey-950);
}

.radio-input-option input[type="radio"]:focus-visible + label {
  outline: 2px solid dodgerblue;
  outline-offset: 2px;
}

.submit-btn {
  background-color: var(--orange-500);
  color: var(--grey-950);
  font-weight: 600;
  letter-spacing: 0.1rem;
  padding: 0.8rem;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.submit-btn:hover {
  background-color: var(--white);
}

.submit-btn:focus-visible {
  outline: 2px solid dodgerblue;
  outline-offset: 2px;
}

.thank-you-state {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1.8rem;
  gap: 1rem;
}

.rating-result-display {
  background-color: #2e3641;
  color: var(--orange-500);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin: 1rem 0;
}

.thanks-message {
  text-align: center;
}
