/* Reset básico para remover margens e paddings padrões */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #121212; /* Fundo escuro */
    color: #E0E0E0; /* Texto claro */
    margin: 0;
    padding: 10px; /* Redução das margens laterais */
}

.page-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Redução da largura máxima da calculadora */
.container {
    background-color: #1E1E1E; /* Fundo mais escuro para o container */
    box-shadow: 0 8px 16px rgba(0,0,0,0.7);
    padding: 30px; /* Redução do padding */
    width: 100%;
    max-width: 350px; /* Redução da largura máxima */
    box-sizing: border-box;
    animation: fadeIn 1s ease-in-out;
}

/* Menu de Navegação */
.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.nav-link {
    margin: 0 15px;
    text-decoration: none;
    color: rgb(143, 254, 129); /* Cor de destaque alterada para verde */
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-link.active {
    color: rgb(143, 254, 129); /* Cor de destaque */
}

.nav-link:hover {
    color: #A5FFA1; /* Cor de hover ajustada */
}

/* Botão de Ajuda */
.help-button {
    background: none;
    border: none;
    color: rgb(143, 254, 129);
    cursor: pointer;
    font-size: 24px;
    transition: color 0.3s;
}

.help-button:hover {
    color: #A5FFA1;
}

/* Formulário */
form#roiForm {
    animation: fadeInUp 0.5s forwards;
}

/* Agrupamento de campos */
.input-group {
    margin-bottom: 15px; /* Aumentado para melhor espaçamento */
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 5px;
    color: #E0E0E0;
    font-weight: bold;
    font-size: 14px; /* Redução do tamanho da fonte */
}

input[type="text"], input[type="number"] {
    padding: 8px; /* Redução do padding */
    border: 1px solid #333; /* Borda mais escura */
    background-color: #2C2C2C; /* Fundo escuro dos inputs */
    color: #E0E0E0; /* Texto claro */
    font-size: 14px; /* Redução do tamanho da fonte */
    transition: all 0.3s ease;
    border-radius: 0; /* Removido o arredondamento */
}

input[type="text"]::placeholder, input[type="number"]::placeholder {
    color: #757575; /* Placeholder mais claro */
}

input[type="text"]:focus, input[type="number"]:focus {
    border-color: rgb(143, 254, 129);
    outline: none;
    box-shadow: 0 0 5px rgba(143, 254, 129, 0.5);
}

.error-message {
    color: #CF6679;
    font-size: 12px; /* Redução do tamanho da fonte */
    margin-top: 5px;
    display: none;
}

/* Botões */
button {
    border: none; /* Removido o arredondamento */
    text-transform: uppercase; /* Textos em maiúsculo */
    font-weight: bold; /* Fontes em negrito */
}

/* Botão Principal */
#calcularROIButton {
    background-color: rgb(143, 254, 129);
    color: #121212; /* Texto escuro para contraste */
    padding: 12px;
    font-size: 16px;
    border-radius: 0; /* Removido o arredondamento */
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    width: auto;
    margin-left: auto;
    display: flex; /* Alterado de block para flex */
    align-items: center; /* Alinha verticalmente os itens */
    gap: 8px; /* Espaçamento entre texto e ícone */
}

#calcularROIButton:hover {
    background-color: #A5FFA1; /* Cor de hover ajustada */
    transform: scale(1.05);
}

/* Container para o botão principal */
.button-container {
    display: flex;
    justify-content: flex-end; /* Alinha o botão à direita */
}

/* Botões Secundários */
button.secondary-button {
    background-color: #333333; /* Fundo escuro */
    color: #E0E0E0;
    font-size: 12px; /* Redução do tamanho da fonte */
    padding: 6px 10px; /* Menor padding */
    display: flex;
    align-items: center;
    justify-content: center; /* Centraliza conteúdo */
    gap: 10px;
    border-radius: 0; /* Removido o arredondamento */
    transition: background-color 0.3s, transform 0.2s;
    width: 100px; /* Reduzido o tamanho */
    font-weight: bold; /* Fontes em negrito */
}

button.secondary-button:hover {
    background-color: #555555;
    transform: scale(1.05);
}

/* Spinner de Carregamento */
.spinner {
    display: none;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 1s ease-in-out;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgb(143, 254, 129);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    position: relative;
}

.loader::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 4px solid #121212;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result {
    background-color: #1E1E1E;
    color: rgb(143, 254, 129);
    padding: 15px;
    border-radius: 0; /* Removido o arredondamento */
    font-size: 16px;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 1s ease-in-out;
}

.result-text {
    color: #E0E0E0;
    font-size: 14px;
}

.result-value {
    font-size: 24px; /* Redução do tamanho da fonte */
    font-weight: bold;
    display: block;
    margin-top: 10px;
}

/* Novo Container para Resultados */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 600px;
    animation: fadeIn 1s ease-in-out;
}

@media (min-width: 800px) {
    .page-wrapper {
        flex-wrap: nowrap;
    }

    .container, .results-container {
        width: 48%;
    }

    .results-container {
        flex-direction: column;
    }
}

/* Seção da Tabela */
.table-section, .chart-section {
    background-color: #1E1E1E;
    box-shadow: 0 8px 16px rgba(0,0,0,0.7);
    padding: 30px;
    box-sizing: border-box;
    animation: slideIn 0.5s ease-in-out;
    border-radius: 0; /* Removido o arredondamento */
}

.card-title {
    font-family: 'Arial', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: rgb(143, 254, 129);
    margin-bottom: 15px;
    margin-top: 0;
}

.table-section h3, .chart-section h3, .nav-link.card-title {
    /* Herda as propriedades de .card-title */
}

/* Botões de Exportar e Limpar na Tabela */
.table-section .table-buttons {
    display: flex;
    justify-content: flex-end; /* Alinha os botões à direita */
    gap: 10px;
    margin-bottom: 10px; /* Espaçamento entre os botões e a tabela */
}

/* Tabela de Resultados */
#resultsTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    animation: fadeIn 1s ease-in-out;
}

#resultsTable th, #resultsTable td {
    border: 1px solid rgb(143, 254, 129); /* Borda verde */
    padding: 8px;
    text-align: center;
}

#resultsTable th {
    background-color: #333333; /* Tom mais escuro para o cabeçalho */
    color: #E0E0E0; /* Texto claro */
    font-size: 12px; /* Redução do tamanho da fonte */
}

#resultsTable td {
    font-size: 14px; /* Consistência do tamanho da fonte */
}

/* Ícones nos Botões */
.material-icons {
    font-size: 14px; /* Redução do tamanho do ícone */
}

/* Botão de Excluir na Tabela */
.delete-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #CF6679; /* Cor vermelha para exclusão */
    transition: color 0.3s, transform 0.2s;
    text-transform: uppercase; /* Textos em maiúsculo */
    font-weight: bold; /* Fonte em negrito */
}

.delete-button .material-icons {
    font-size: 14px; /* Redução do tamanho do ícone */
}

.delete-button:hover {
    color: #FF1744;
    transform: scale(1.2);
}

/* Gráfico de ROI */
.chart-section {
    position: relative;
}

#roiChart {
    max-width: 100%;
    height: 300px; /* Ajuste de altura para melhor visualização */
}

/* Botão de Ajuda */
.help-button {
    background: none;
    border: none;
    color: rgb(143, 254, 129);
    cursor: pointer;
    font-size: 24px;
    transition: color 0.3s;
    margin-left: 15px; /* Espaçamento entre o título e o botão */
}

.help-button:hover {
    color: #A5FFA1;
}

/* Estilos do Modal */
.modal {
    display: none; /* Oculto por padrão */
    position: fixed; /* Fixa na tela */
    z-index: 1000; /* Fica acima de outros elementos */
    left: 0;
    top: 0;
    width: 100%; /* Largura total */
    height: 100%; /* Altura total */
    overflow: auto; /* Habilita scroll se necessário */
    background-color: rgba(0,0,0,0.8); /* Fundo semi-transparente */
    padding-top: 60px; /* Espaçamento superior */
}

.modal-content {
    background-color: #1E1E1E;
    margin: 5% auto; /* 5% do topo e centralizado */
    padding: 30px;
    border: 1px solid #888;
    width: 90%; /* Largura do modal */
    max-width: 800px; /* Largura máxima */
    color: #E0E0E0;
    border-radius: 4px; /* Arredondamento sutil */
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
    text-decoration: none;
}

/* Estilos Adicionais para o Conteúdo do Modal */
.modal-content h2 {
    color: rgb(143, 254, 129);
    margin-bottom: 20px;
    text-align: center;
}

.help-section {
    margin-bottom: 20px;
}

.help-section h3 {
    color: rgb(143, 254, 129);
    margin-bottom: 10px;
    font-size: 18px;
}

.help-section p {
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: justify;
}

.help-section ul,
.help-section ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.help-section li {
    margin-bottom: 8px;
}

/* Responsividade do Modal */
@media (max-width: 600px) {
    .modal-content {
        padding: 20px;
    }

    .modal-content h2 {
        font-size: 24px;
    }

    .help-section h3 {
        font-size: 16px;
    }

    .help-section p,
    .help-section ul,
    .help-section ol {
        font-size: 14px;
    }
}

/* Estilos para as abas */
.tab {
    overflow: hidden;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #333;
}

.tab button {
    background-color: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    transition: color 0.3s, border-bottom 0.3s;
    font-weight: bold;
    font-size: 14px;
    color: #E0E0E0;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent; /* Borda inicial transparente */
}

.tab button.active {
    color: rgb(143, 254, 129); /* Texto verde */
    border-bottom: 2px solid rgb(143, 254, 129); /* Borda inferior verde */
}

.tab button:hover {
    color: rgb(143, 254, 129); /* Cor do texto no hover */
}

/* Ocultar conteúdo das abas por padrão */
.tabcontent {
    display: none;
    padding: 20px;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilos para o Header */
header {
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif; /* Fonte escolhida */
    color: #333;
}

header p:first-of-type {
    font-size: 18px;
    color: #999;
    margin-bottom: 10px;
}

header p a {
    text-decoration: none;
    color: #0077b5; /* Cor padrão do LinkedIn */
    font-weight: bold;
    transition: color 0.3s ease;
}

header p a:hover {
    color: #005582; /* Cor mais escura no hover */
}

header p a:not(:last-child)::after {
    content: " ♦ ";
    color: #333; /* Cor do separador */
}

/* Estilos para os selects de Sim/Não */
select {
    background-color: #2C2C2C; /* Fundo escuro, igual aos outros campos */
    color: #E0E0E0; /* Texto claro */
    border: 1px solid #333; /* Borda escura */
    padding: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

select:focus {
    border-color: rgb(143, 254, 129); /* Cor verde no foco */
    box-shadow: 0 0 5px rgba(143, 254, 129, 0.5);
}

/* Cores personalizadas para as opções do select */
select option[value="sim"] {
    color: #90EE90; /* Verde claro para "Sim" */
}

select option[value="nao"] {
    color: #FF6347; /* Vermelho tomate para "Não" */
}

