@import url("https://rsms.me/inter/inter.css");

html {
  font-family: "Inter", sans-serif;
}

@supports (font-variation-settings: normal) {
  html {
    font-family: "Inter var", sans-serif;
  }
}

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

body {
  background: rebeccapurple;
  color: #071723;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

main {
  background-color: #f2f2f2;
  border-radius: 8px;
  box-shadow: 10px 22px 34px 0 rgba(0, 0, 0, 0.5);
  margin: 20px auto;
  overflow: hidden;
  width: 100%;
  max-width: 550px;
}

header {
  background: url(images/header.png) center right no-repeat;
  background-size: cover;
  height: 187px;
  padding: 23px 36px;
  display: flex;
  align-items: flex-end;
}

header h1 {
  color: #fff;
  font-size: 23px;
  font-weight: 300;
  line-height: 1.4;
}

header h1 strong {
  font-weight: bold;
  font-size: 24px;
}

form {
  padding: 32px;
}

fieldset {
  border: none;
  margin-bottom: 20px;
}

legend {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

label {
  display: flex;
  align-items: center;
  font-size: 16px;
  margin-bottom: 8px;
  cursor: pointer;
}

input[type="checkbox"] {
  accent-color: #2f3676;
  margin-right: 8px;
  transform: scale(1.2);
  cursor: pointer;
}

textarea {
  background: #dde3e9;
  border: 1px solid #2f3676;
  border-radius: 8px;
  color: #071723;
  height: 140px;
  padding: 16px;
  resize: none;
  width: 100%;
  font-size: 14px;
}

.counter {
  display: flex;
  align-items: center;
}

.counter button {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.counter svg {
  fill: #2f3676;
  transition: transform 0.2s ease;
}

.counter svg:hover {
  transform: scale(1.1);
}

.counter input {
  background: #dde3e9;
  border: 1px solid #2f3676;
  border-radius: 7px;
  font-size: 20px;
  font-weight: bold;
  margin: 0 8px;
  width: 60px;
  text-align: center;
  pointer-events: none; /* impede digitar manualmente */
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.form-actions button {
  appearance: none;
  background: #2f3676;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 18px;
  text-transform: uppercase;
  font-weight: bold;
  padding: 10px 32px;
  cursor: pointer;
  transition: 0.3s ease;
}

.form-actions button:hover,
.form-actions button:focus {
  border: 2px solid #2f3676;
  background: #191847;
}

/* Responsividade */
@media (max-width: 600px) {
  main {
    width: 90%;
  }

  header {
    height: 150px;
    padding: 16px;
  }

  header h1 {
    font-size: 20px;
  }

  header h1 strong {
    font-size: 22px;
  }

  legend {
    font-size: 16px;
  }
}
