@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    --primary-color: #14007A;
    --accent-color:  #41445b;
    --bg-color:      #F7F7F7;
    --surface-color: #FFFFFF;
    --text-color:    #333333;
    --radius:        8px;
    --font:          'Montserrat', sans-serif;
}

label {
    display: inline-block;
    width: 25px;
    margin-top: 10px;
    font-weight: bold;
}

.section {
    background: white;
    padding: 20px;
    margin: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.section-main {
    background: white;
    padding: 20px;
    margin-top: 50px;
    margin-bottom: 0;
    margin-left: 10%;
    margin-right: 10%;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.section-dupla {
    background: white;
    padding: 0px;
    border-radius: 10px;
    margin-right: 2rem;
}

.linha-dupla {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.linha-dupla .campo {
    flex: 1;
}

header {
    display: flex;
    justify-content: flex-start;
    /*background-color: var(--surface-color);*/
    background-color: #f8f8f8;
    /*box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);*/
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 2rem;
    border-top: 3px solid #fd7e14;
}

.header-container {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 7rem;
}

body {
    margin: 0;
    padding: 0px;
    background-color: var(--bg-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
}

.titulo {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--cor-primaria);
}

.pergunta {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--cor-cinza);
    padding-bottom: 20px;
} 

form {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    border-radius: 8px;
} 

.alternativa { 
    margin-bottom: 15px; 
}

.alternativa label { 
    font-weight: bold; margin-right: 5px; 
}

.alternativa-texto { 
    display: inline-block; max-width: 90%; margin-bottom: 5px; 
    color: #444;
}

.alternativa select {
    width: 100%; padding: 6px 10px; border: 1px solid var(--cor-cinza);
    border-radius: 4px; background-color: white; font-size: 14px;
}

select {
    width: calc(100% - 30px);
    padding: 6px 10px;
    margin-bottom: 10px;
    border: 1px solid var(--cor-black);
    border-radius: 4px;
    background-color: black;
    font-size: 14px;
}

h1 {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
} 

h2 {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #002b45;
    margin: 0;
}

.branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 50px;
    width: auto;
    margin-right: 1rem;
    align-self: left;
}

/* Hamburger button */
.hamburger {
    position: absolute;
    right: 1rem;
    display: block;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #45002f;
    cursor: pointer;
    z-index: 1100;
    box-shadow: none;
    margin-bottom: 1%;
}

.hamburger:hover {
    color: #ffffff;
    background-color: var(--accent-color);
}

/* Sidebar menu */
nav {
    position: fixed;
    top: 0;
    left: -240px;
    height: 100%;
    width: 240px;
    background-color: var(--surface-color);
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    padding-top: 4rem;
    transition: left 0.3s ease;
    z-index: 1050;
}

nav.open {
    left: 0;
}

nav a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #002b45;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.2s, color 0.2s;
}

nav a:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}

/* Ajuste do fundo quando o menu for aberto */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);  /* Escurecimento de 60% */
    opacity: 0;  /* Inicia invisível */
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;  /* Efeito suave */
    z-index: 1040;
}

.overlay.show {
    opacity: 1;  /* Torna visível */
    visibility: visible;  /* Garante que o overlay apareça */
}

.input-container {
    display: flex;
    gap: 0.5rem;
}

button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.9rem 2rem;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-left: 10%;
    margin-top: 1%;
    transition: all 0.3s ease;
}

button:hover {
    background-color: var(--accent-color);
    background-color: #1f005c;
    transform: scale(1.02);
}

.remover-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #444;
    padding: 1px;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
}

.remover-btn:hover {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #444;
    padding: 1px;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    color: white;
}

.botao-dependente {
    background-color: #0e004bcf;
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto 30px auto; /* centraliza como a .section */
}

.botao-dependente:hover {
    background-color: var(--accent-color);
}

.checkbox-container {
    display:flex;
    align-items: center;
    width: 20%;
    gap: 10px;
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    margin: 0;
}

.checkbox-input {
    transform: scale(1.5);
    margin-top: 17px;
    cursor: pointer;
}

.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.popup-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    font-family: 'Montserrat', sans-serif;
}

.erro {
    color: #c62828;font-weight: bold;text-align: center;margin-top: 15px;
}

.popup-botoes {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.popup-box button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
}

.popup-box button:hover {
    opacity: 0.9;
}

.popup-box button.secundario {
    background-color: #ccc;
    color: #333;
}

.popup-box button:not(.secundario) {
    background-color: var(--primary-color);
    color: white;
}

#resultado {
    margin-top: 20px;font-weight: bold;text-align: center;
    color: green;white-space: pre-line;
}

.grafico-container {
    max-width: 800px;margin: 40px auto;
}

.grafico-container canvas { 
    margin-top: 30px; 
}

#opcoes-visao { 
    display: flex; justify-content: center; gap: 20px; margin: 20px 0; 
}

.grafico-wrapper {
  max-width: 800px;
  margin: 0 auto 20px auto;

  text-align: left;
  margin: 40px auto;
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

canvas {
  width: 100% !important;
  height: auto !important;
}

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

select {
    border: 1px solid rgb(210, 209, 209) !important;
}

footer {
  background-color: #fff;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #ddd;
  margin-top: 50px;
  color: #555;
  font-size: 11px;
}

.footer-container {
  max-width: 960px;
  margin: 0 auto;
}
