:root {
  --primary: #005091;
  --secondary: #006dc7;
  --tertiary: #002644;
  --quaternary: #1395ff;
  --background: #fafafa;
  --foreground: #fff;
  --green: #0fb90f;
  --red: #c02626;
  --scrollbar-hover: #2c72ac;
  --color-outline: #007eb377;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

ul,
ol {
  padding-left: 1rem;
}

li {
  list-style-position: inside;
}

p,
li {
  text-align: justify;
}

p.center {
  text-align: center;
}

p:not(:last-child) {
  margin-bottom: 0.5rem;
}

body {
  font-size: 16px;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: stretch;
  position: relative;

  background-color: var(--background);
}

body::before {
  content: " ";
  background-color: #0007;

  position: absolute;
  top: 0;
  left: 0;
  z-index: 998;

  width: 100%;
  height: 100%;

  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

body::after {
  content: " ";
  border: 0.5rem solid #fff;
  border-left-color: var(--primary);
  border-radius: 50%;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  z-index: 999;

  width: min(20vw, 5rem);
  height: min(20vw, 5rem);

  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;

  animation: spinner 1s linear infinite;
}

body.loading * {
  pointer-events: none;
}

body.loading::before {
  pointer-events: all;
  opacity: 1;
}

body.loading::after {
  pointer-events: all;
  opacity: 1;
}

@keyframes spinner {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

header,
footer {
  flex: 0;
}

header {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  align-items: center;

  padding: 0.5rem;
  border-bottom: 0.3rem solid var(--primary);
}

header h1 {
  text-align: center;
  margin: 0;
  color: var(--primary);
  font-size: 1.5rem;
}

header h2 {
  text-align: center;
  margin: 0;
  color: var(--primary);
  font-size: 1.3rem;
}

header > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

main {
  flex: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
}

.img-logo {
  height: 4rem;
  object-fit: contain;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;

  width: min(85vw, 27rem);
  overflow-x: hidden;
  position: relative;
  padding: 1rem;

  border-radius: 1rem;
  background-color: var(--foreground);
  border: 2px solid #333;
  /* box-shadow: 
        -0.2rem -0.2rem 0.2rem #fff7,
        0.2rem 0.2rem 0.2rem #0007; */
  margin: 0.5rem;
}

.card > :is(h2, h3):first-child {
  margin-bottom: 0.5rem;
}

label {
  color: #444;
  white-space: nowrap;
  vertical-align: middle;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.2rem;
}

input:not([type="checkbox"]),
select,
.file-input-group label {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 400;
  color: #444;
  background-color: #fefefe;
  background-clip: padding-box;
  border: 1px solid #777;
  border-radius: 0.25rem;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  font-size: 1em !important;
  padding: 0px 5px !important;
  overflow: visible;
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  text-indent: 0px;
  text-shadow: none;
  text-align: start;
  appearance: textfield;
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  text-rendering: auto;
  -webkit-rtl-ordering: logical;
  outline-color: var(--color-outline);
  outline-width: 1px;
  cursor: text;
}

.terms-container {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  color: #444;
  background-color: #fefefe;
  background-clip: padding-box;
  border: 1px solid #777;
  border-radius: 0.25rem;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  height: 10rem;
  max-height: 10rem;
  overflow-y: auto;
  background: #fcffe9;
}

.terms-container::-webkit-scrollbar {
  width: 0.5em;
  border: 0;
}

.terms-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 0.25em;
  border: 0;
}

.terms-container::-webkit-scrollbar-track {
  border: 0;
  background: transparent;
}

.terms-container::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

input,
select,
.file-input-group label,
.file-input-group button {
  height: 1.8em !important;
  line-height: 1.8em !important;
}

input:disabled,
textarea:disabled {
  background-color: #e7e7e7;
}

.file-input-group {
  display: flex;
  width: 100%;
  position: relative;
  height: 1.8em !important;
}

.file-input-group * {
  position: absolute;
}

.file-input-group label::after,
.file-input-group button {
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  border: 1px solid #ced4da;
  border-radius: 0 0.25rem 0.25rem 0;

  top: 0;
  width: min(7rem, 25%);
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.file-input-group label {
  pointer-events: none;
}

.file-input-group label::after {
  content: "Selecionar";
  background: #eee;
  border: none;
  border-left: 1px solid rgba(0, 0, 0, 0.075);
  position: absolute;
  right: 0;
  pointer-events: auto;
}

.file-input-group label:hover::after {
  background: #fafafa;
}

.file-input-group label:active::after {
  background: #e0e0e0;
}

.file-input-group button.view {
  right: 0;
  z-index: 1;
}

.file-input-group button.delete.active ~ button.view {
  right: calc(min(7rem, 20%) - 0.5rem);
  padding-right: 0.5rem;
}

.file-input-group button.delete {
  right: 0;
  z-index: 2;
}

.file-input-group button {
  display: none;
  outline: none;
  border: none;
  color: white;
}

.file-input-group button.active {
  display: block;
}

.file-input-group input[type="file"] {
  opacity: 0;
  pointer-events: none;
}

a.button {
  text-decoration: none;
}

button,
a.button {
  outline: none;
  cursor: pointer;

  border: none;
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;

  background-color: var(--primary);
  color: var(--foreground);
  font-size: 1rem;
  font-weight: bold;

  transition: 0.2s;
}

button:hover,
a.button:hover {
  background-color: var(--secondary);
}

button:active,
a.button:active {
  background-color: var(--tertiary);
}

button.outline,
a.button.outline {
  padding: 0.35rem 0.85rem;

  background-color: transparent;
  border: 0.15em solid var(--primary);
  color: var(--primary);
}

button.outline:hover,
a.button.outline:hover {
  border: 0.15em solid var(--secondary);
  color: var(--secondary);
}

button.outline:active,
a.button.outline:active {
  border: 0.15em solid var(--tertiary);
  color: var(--tertiary);
}

h3,
h4 {
  color: var(--tertiary);
}

p {
  color: var(--tertiary);
  text-align: justify;
}

.btn-group {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin-top: 1rem;
}

.btn-group *:not(:last-child) {
  margin-right: 1rem;
}

.contador {
  width: 70%;
  border: 2px solid #333;
  border-radius: 0.5rem;
  padding: 0.5rem;
  transition: 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.contador:hover {
  background-color: #0002;
  filter: brightness(-50%);
}

.contador h3 {
  text-align: center;
}

.contador h3:first-child {
  margin-bottom: 0.5rem;
}

.list-urnas {
  display: flex;
  flex-direction: revert;
  flex-wrap: wrap;
  align-items: flex-start;
}

.list-urnas .urna {
  flex: 0 0 50%;
}

.list-urnas .urna:nth-child(2n-1) {
  text-align: left;
}

.list-urnas .urna:nth-child(2n) {
  text-align: right;
}

.list-urnas h3,
h3.total {
  color: black;
}

.list-urnas h3 .votos,
h3.total .votos {
  color: var(--tertiary);
}

.list-pessoas li {
  text-align: center;
}

.list-pessoas li:not(:last-child) {
  margin-bottom: 0.3rem;
}

.list-pessoas li a {
  text-decoration: none;
  color: #333;
  transition: 0.2s;
}

.list-pessoas li a:hover {
  color: #444;
}

.list-pessoas li a:active {
  color: #222;
}

h3.dark {
  color: black;
}

h3.space-down {
  margin-bottom: 0.5rem;
}

footer hr {
  margin: 0 0 2rem 0;
}

.hidden {
  opacity: 0;
}

.img-foto {
  height: 7rem;
  object-fit: cover;
  aspect-ratio: 1;
  border-radius: 50%;
}

.pessoas h3 {
  text-align: center;
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }
}
