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

body, 
html {
  height: 100vh;
  width: 100%;
}

body, 
html, 
input,
button {
  font-family: 'Lato', sans-serif;
  color: var(--color-default)
}

body {
  box-sizing: border-box;
}

*,
*::after,
*::before {
  margin: 0;
  padding: 0;

  /* Inherited from body because it's a better practise */
  box-sizing: inherit;
}

/* COMPONENTS */
.form-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-input--actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-input__label {
  font-weight: 700;
}

.form-input__input {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  height: var(--element-height);
  padding: 0 1rem;
  width: 100%;
}

.form-input__input:focus-visible {
  border: 1px solid var(--primary);
  outline: none;
}

.form-input__error{
  color: var(--danger);
  font-size: 0.8rem;
}

/* Button */
.btn {
  height: var(--element-height);
  border-radius: var(--border-radius);
  padding: 0 1rem;
}

.btn--primary {
  background-color: var(--primary);
  border-width: 0;
  color: var(--color-on-primary);
  font-size: 1rem;
}

.btn--primary:hover {
  box-shadow: 0px 0px 10px 0px var(--primary);
  -moz-box-shadow: 0px 0px 10px 0px var(--primary);
  -webkit-box-shadow: 0px 0px 10px 0px var(--primary);
}

/* Link */
a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
}

/* Checkbox */
.checkbox label {
  display: grid;
  grid-template-columns: 1em auto;
  gap: 0.5em;
}

input[type="checkbox"] {
  appearance: none;
  background-color: #fff;
  margin: 0;
  font: inherit;
  color: currentColor;
  width: 1em;
  height: 1em;
  border: 1px solid currentColor;
  border-radius: 4px;
  transform: translateY(0.15em);

  display: grid;
  place-content: center;
}

input[type="checkbox"]::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--primary);

  transform-origin: bottom left;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:focus {
  outline: max(2px, 0.15em) solid var(--primary);
  outline-offset: max(2px, 0.15em);
}

/* Alert */
.alert {
  padding: 0.3rem;
  border: 1px solid currentColor;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.alert__msg {
  display: inline-block;
  text-align: center;
}

.alert-success {
  background-color: rgba(var(--success-rgb), 0.1);
  color: var(--success);
}

.alert-warning {
  background-color: rgba(var(--warning-rgb), 0.1);
  color: var(--warning);
}

.alert-error {
  background-color: rgba(var(--danger-rgb), 0.1);
  color: var(--danger);
}

:root {
  --primary: #cd3c23;
  --secondary: #357983;

  --color-on-primary: #fff;
  --color-on-secondary: #fff;
  --color-default: #424242;
  --color-h1: #424242;
  --color-h2: #00a78b;
  --color-a: #434142;
  
  --danger: #f83434;
  --danger-rgb: 248, 52, 52;
  --success: #4bbb83;
  --success-rgb: 75, 187, 131;
  --warning: #fcb318;
  --warning-rgb: 252, 179, 24;

  --border-color: #a5a5a5;
  --border-radius: 6px;

  --element-height: 40px;
}

@media (max-width: 1024px) {
  html {
    font-size: 87.5%;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 75%;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 62.5%;
  }

  :root {
    --element-height: 35px;
  }
}


.modal {
  display: none; 
  position: fixed; 
  z-index: 1; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgb(0,0,0); 
  background-color: rgba(0,0,0,0.4); 
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto; 
  padding: 20px;
  border: 1px solid #888;
  width: 80%; 
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal-content p strong {
  font-weight: bold;
  display: block;
  margin-top: 10px;
}

.modal-content p {
  margin-bottom: 10px;
}