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

:root {
  --BG-card: hsl(0, 100%, 100%);
  --BG-body: hsl(275, 100%, 97%);
  --paragraph: hsl(292, 16%, 49%);
  --heading: hsl(292, 42%, 14%);
  --focus: hsl(279, 84%, 53%);

  --Font-Family: 400 16px "Work Sans", sans-serif;
}

/* geral config */
#loading {
  background-color: var(--BG-body);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: var(--heading);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  z-index: 1000;
}
#loading.hidden {
  display: none;
}

body {
  background-color: var(--BG-body);
  color: var(--paragraph);
  font: var(--Font-Family);

  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 1em;
  padding: 1.5em;
  position: relative;
}
body::before {
  content: "";
  width: 100%;
  height: 100%;

  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;

  background-image: url(./images/background-pattern-mobile.svg);
  background-size: contain;
  background-repeat: no-repeat;
}
img {
  width: 100%;
}

.faqs-card {
  background-color: var(--BG-card);
  padding: 1.5em;
  display: grid;
  gap: 1em;
  border-radius: 0.7em;
}

/* header */
.faqs-logo {
  display: flex;
  align-items: center;
  gap: 1.5em;

  color: var(--heading);
}
.faqs-logo .faqs-icon {
  width: 1.5em;
  height: 1.5em;
}

/* questions */
.faqs-question-list {
  list-style: none;
  display: grid;
}
.faqs-question-item {
  margin-top: 2em;
  display: grid;
  gap: 1.5em;
  padding-bottom: 1.5em;
  border-bottom: 2px solid var(--BG-body);
}
.faqs-question-item:last-child {
  border: none;
}
.faqs-question-area {
  display: flex;
  gap: 1em;
  justify-content: space-between;
  align-items: center;
}
.faqs-question {
  width: 100%;
  font-size: 1em;
  font-weight: 600;
  color: var(--heading);
  outline: none;
  cursor: pointer;
}
.faqs-question:hover,
.faqs-question:focus {
  color: var(--focus);
}
.is-open {
  background-image: url(./images/icon-plus.svg);
  background-size: contain;
  background-repeat: no-repeat;
  width: 2em;
  height: 2em;
  cursor: pointer;
}
.open {
  background-image: url(./images/icon-minus.svg);
}
.faqs-answer {
  display: none;
}
.active {
  display: block;
}

.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

@media screen and (min-width: 600px) {
  body::before {
    background-image: url(./images/background-pattern-desktop.svg);
    background-size: contain;
    background-repeat: no-repeat;
  }

  .faqs-card {
    width: 600px;
    padding: 2em;
  }
  .faqs-logo .faqs-icon {
    width: 2em;
    height: 2em;
  }
  .faqs-logo .faqs-heading {
    font-size: 3em;
  }
}
