/* Reset e Configurações Globais */

* {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  background-color: #91bdff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header / Navbar */

#navbar {
  background-color: #0a6cff;
  box-shadow: 0px 0px 28px -11px rgba(0, 0, 0, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#gerator-title {
  color: #fff;
  font-size: clamp(1rem, 3vh, 4rem);
  font-weight: bold;
  height: 60px;
  display: flex;
  align-items: center;
}

/* Seção: Calculadora (Container Principal) */

#calculator {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #0a6cff;
  width: fit-content;
  margin: 0 auto;
  box-shadow: 0px 0px 28px -11px rgba(0, 0, 0, 1);
  margin-top: 4rem;
  padding: 1rem 2rem;
  border-radius: 1rem;
}

.title {
  font-weight: bold;
  display: flex;
  text-align: center;
  justify-content: center;
  padding-bottom: 1.4rem;
  font-size: clamp(0.8rem, 4vh, 5rem);
  color: #ffffff;
  margin-top: 4rem;
}

/*  Formulário de Entrada */

#form-tabuada {
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  gap: 1rem;
  padding: 2rem 3rem;
  width: fit-content; /* só ocupa o tamanho do conteúdo */
  margin: 0 auto;
  margin-top: 1rem;
}

.form-control {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-control input {
  text-align: center;
  width: 4rem;
  border: none;
  border: 1px solid #000;
  border-radius: 5px;
  padding: 0.3rem 0;
  margin-top: 5px;
}

/* Botão */

.btn {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
}

.btn input {
  font-size: 1rem;
  color: #fff;
  border: none;
  background-color: #464646;
  padding: 0.4rem 4rem;
  border-radius: 0.4rem;
}

/* Resultado da Tabuada */

#result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

#result-title {
  font-size: clamp(0.7rem, 3vh, 4rem);
  color: #fff;
  margin-top: 2.6rem;
  font-weight: bold;
}

#row-inputs {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/*  Área de Operações (Linhas da Tabuada) */

#operations {
  display: flex;
  flex-wrap: wrap;
  text-align: center;
  background-color: #fff;
  padding: 1.4rem 1.4rem;
  border-radius: 1rem;
  margin-top: 1.4rem;
  justify-content: center;
}

#operations .row {
  display: flex;
  justify-content: center;
  border: 1px solid #ccc;
  padding: 0.7rem;
  width: 180px;
  align-items: center;
}

#operations .row:last-child {
  border-bottom: 1px solid #ccc;
}

#operations .result {
  margin-left: 0.4rem;
}

/* Ajustes de Tamanho Para Tabelas Grandes */

#calculator.large-operations {
  padding-bottom: 6rem;
  margin-bottom: 3rem;
}

/* Footer / Contatos */

#section-contact {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  justify-content: center;
}

#contact {
  display: flex;
  justify-content: center;
  min-height: 100px;
  flex-direction: column;
  align-items: center;
  background-color: #0a6cff;
  width: 100%;
  gap: 0.5rem;
  box-shadow: 0px 0px 28px -11px rgba(0, 0, 0, 1);
}

#contact li {
  width: 400px;
  text-decoration: none;
  list-style: none;
  text-align: center;
}

#contact li a {
  color: #fff;
  text-decoration: none;
}

/* Responsividade */

@media (max-width: 840px) {
  #calculator {
    padding: 1rem 2rem;
    margin-bottom: 4rem;
  }

  #gerator-title {
    padding: 3rem;
  }
}

@media (max-width: 386px) {
  #calculator {
    padding: 0 0 8rem 0;
  }

  .title {
    font-size: 1.6rem;
  }

  #gerator-title {
    font-size: 1.4rem;
  }

  #result-title {
    font-size: 1.4rem;
  }

  #form-tabuada {
    padding: 1rem 2rem;
  }

  .form-control > label {
    font-size: 0.8rem;
  }
}
