@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

html, body {
  height: 100%;
}

body {
    font-family: "Roboto", sans-serif;
    font-style: normal;
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.1rem);
    background-color: #f5ffdb;
    display: flex;
    justify-content: center;
    align-items: center;
}

label, legend {
      font-size: 0.9em;
}

select::picker-icon {
    color:rgb(230, 170, 8);
}

.input-base,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
  padding: 0.6rem;
  border-radius: 0.5rem;
  border: 0.125rem solid rgb(219, 171, 39);
  font-size: 1em;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: rgb(219, 171, 39);
  transform: scale(1.5);
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.checkbox-label {
  cursor: pointer;
  position: relative;
  padding-left: 30px;
}

.checkbox-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #333;
  border-radius: 4px;
  background-color: #fff;
}

input[type="checkbox"]:checked + .checkbox-label::before {
  background-color: rgb(219, 171, 39); 
  border-color: #ec8907;
}

input[type="checkbox"]:checked + .checkbox-label::after {
  content: '\2713';
  position: absolute;
  left: 5px;
  top: 1px;
  color: white;
  font-size: 18px;
}

input[type="submit"],
input[type="reset"] {
  margin-top: 0.5rem;
  padding: 0.6rem;
  font-size: 1em;

  border: 0.125rem solid rgb(230, 170, 8);
  border-radius: 0.5rem;
  background-color: #ffffff;
  cursor: pointer;
}

input[type="submit"]:hover {
  background-color: rgb(156, 219, 39);
}

input[type="reset"]:hover {
  background-color: rgb(219, 105, 39);
}

input[type=submit]:active,
input[type=reset]:active {
     box-shadow: 0 5px #666;
    transform: translateY(0.5rem);
}

input[type=reset]:hover,
input[type=submit]:hover {
    box-shadow:0 0.75rem 1.25rem 0 rgba(0,0,0,0.6)
}

input[type=range] {
  width: 100%;
  margin: 13.8px 0;
  background-color: transparent;
  appearance: none;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  background: rgb(230, 170, 8);
  border: 0.2px solid #010101;
  border-radius: 1.3px;
  width: 100%;
  height: 8.4px;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  margin-top: -14px;
  width: 16px;
  height: 36px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 3px;
  cursor: pointer;
  -webkit-appearance: none;
}

input[type=range]:focus::-webkit-slider-runnable-track {
  background: rgb(230, 170, 8);
}

input[type=range]::-moz-range-track {
  background: rgba(48, 113, 172, 0.2);
  border: 0.2px solid #010101;
  border-radius: 1.3px;
  width: 100%;
  height: 8.4px;
  cursor: pointer;
}

input[type=range]::-moz-range-thumb {
  width: 16px;
  height: 36px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 3px;
  cursor: pointer;
}

input[type=range]::-ms-track {
  background: transparent;
  border-color: transparent;
  border-width: 14.8px 0;
  color: transparent;
  width: 100%;
  height: 8.4px;
  cursor: pointer;
}

input[type=range]::-ms-fill-lower {
  background: #2a6498;
  border: 0.2px solid #010101;
  border-radius: 2.6px;
}

input[type=range]::-ms-fill-upper {
  background: rgba(48, 113, 172, 0.2);
  border: 0.2px solid #010101;
  border-radius: 2.6px;
}

input[type=range]::-ms-thumb {
  width: 16px;
  height: 36px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 0px;
}

input[type=range]:focus::-ms-fill-lower {
  background: rgba(48, 113, 172, 0.2);
}

input[type=range]:focus::-ms-fill-upper {
  background: #367ec0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;

  width: min(95%, 28rem);
  padding: 1.5rem;

  background-color: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.15);

  max-height: 90vh;
  overflow-y: auto;
}

h2 {
  text-align: center;
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
}

textarea {
  box-sizing: border-box;
  field-sizing: content;
  padding: 0.6rem;
  border-radius: 0.5rem;
  border: 0.125rem solid rgb(219, 171, 39);
  font-size: 1em;
  max-width: 100%;
  min-height: 8rem;
  resize: vertical;
}

.error {
  font-size: 0.85em;
  color: #c0392b;
  visibility: hidden;
}

.error.active {
  visibility: visible;
}

input.invalid {
  border-color: #c0392b;
}

input.valid {
  border-color: green;
}

#radio_group {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
}