:root {
  --bg: #fdfcfa;
  --fg: #151515;
  --accent: #c8102e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131313;
    --fg: #f1efea;
    --accent: #ff4d5e;
  }
}

* {
  box-sizing: border-box;
}

body {
  max-width: 40em;
  margin: 0 auto;
  padding: 2em 1em;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
}

h1 {
  line-height: 1.1;
}

.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home main {
  margin: auto 0;
}

.home h1 {
  margin: 0 0 1em;
  font-size: clamp(2.5rem, 10vw, 5rem);
}

.home nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
}

.button {
  min-width: 9em;
  padding: 0.7em 1.5em;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.button:hover,
.button:focus-visible {
  background: transparent;
  color: var(--accent);
}

/* Versão compacta, usada nos links do índice. */
.button-small {
  display: inline-block;
  min-width: 0;
  padding: 0.2em 0.7em;
  font-size: 0.85em;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

/* Logo da rede antes do texto, na mesma cor do texto do botão. */
.icone::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: -0.125em;
  background: currentColor;
  -webkit-mask: var(--icone) center / contain no-repeat;
  mask: var(--icone) center / contain no-repeat;
}

.icone-linktree { --icone: url("icones/linktree.svg"); }
.icone-link { --icone: url("icones/link.svg"); }
.icone-instagram { --icone: url("icones/instagram.svg"); }
.icone-twitter { --icone: url("icones/x.svg"); }
.icone-email { --icone: url("icones/email.svg"); }
.icone-whatsapp { --icone: url("icones/whatsapp.svg"); }

footer {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid color-mix(in srgb, var(--fg) 20%, transparent);
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
}

footer p {
  margin: 0.3em 0;
}

.lead {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
}

.wide {
  max-width: 76em;
}

/* Em telas médias a tabela rola de lado em vez de vazar da página. */
.datatable-container {
  overflow-x: auto;
}

/* Índice (Simple-DataTables) */
.datatable-wrapper {
  font-family: system-ui, sans-serif;
  font-size: 0.95rem;
}

.datatable-top,
.datatable-bottom {
  padding-left: 0;
  padding-right: 0;
}

.datatable-search {
  float: none;
}

.datatable-input {
  width: 100%;
  max-width: 24em;
  padding: 0.5em 0.75em;
  border: 2px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.datatable-table > thead > tr > th {
  border-bottom: 2px solid var(--fg);
  text-align: left;
}

.datatable-table > tbody > tr > td {
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 20%, transparent);
}

.datatable-sorter,
.datatable-pagination a {
  color: var(--fg);
}

/* Em telas estreitas, cada pessoa vira um cartão. */
@media (max-width: 45em) {
  .datatable-table > thead {
    display: none;
  }

  .datatable-table,
  .datatable-table > tbody,
  .datatable-table > tbody > tr,
  .datatable-table > tbody > tr > td {
    display: block;
    width: auto;
  }

  .datatable-table > tbody > tr {
    padding: 0.75em 0;
    border-bottom: 2px solid var(--fg);
  }

  .datatable-table > tbody > tr > td {
    padding: 0.15em 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .datatable-table > tbody > tr > td::before {
    display: inline-block;
    min-width: 7.5em;
    font-weight: 700;
  }

  /* No cartão, endereços longos podem quebrar em vez de vazar da tela. */
  .button-small {
    white-space: normal;
  }

  .datatable-table > tbody > tr > td:nth-child(1) {
    font-size: 1.15rem;
    font-weight: 700;
  }

  .datatable-table > tbody > tr > td:nth-child(2)::before { content: "Partido"; }
  .datatable-table > tbody > tr > td:nth-child(3)::before { content: "Estado"; }
  .datatable-table > tbody > tr > td:nth-child(4)::before { content: "Instagram"; }
  .datatable-table > tbody > tr > td:nth-child(5)::before { content: "X/Twitter"; }
  .datatable-table > tbody > tr > td:nth-child(6)::before { content: "E-mail"; }
  .datatable-table > tbody > tr > td:nth-child(7)::before { content: "WhatsApp"; }
  .datatable-table > tbody > tr > td:nth-child(8)::before { content: "Outros Links"; }
}
