/* Simulador de Orçamento 50/30/20 - Estilos Isolados */

/* Variáveis CSS para consistência */
.simulador-orcamento-50-30-20-wrapper {
    --so502020-primary-color: #1E3A8A;
    --so502020-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --so502020-secondary-color: #6B7280;
    --so502020-success-color: #10B981;
    --so502020-error-color: #EF4444;
    --so502020-warning-color: #F59E0B;
    --so502020-border-radius: 10px;
    --so502020-border-radius-lg: 15px;
    --so502020-box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    --so502020-box-shadow-lg: 0 10px 30px rgba(102, 126, 234, 0.3);
    --so502020-transition: all 0.3s ease;
    --so502020-font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Reset e Base - Isolado */
.simulador-orcamento-50-30-20-wrapper {
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--so502020-font-family);
    line-height: 1.6;
    color: #111827;
    position: relative;
    isolation: isolate;
}

.simulador-orcamento-50-30-20-wrapper *,
.simulador-orcamento-50-30-20-wrapper *::before,
.simulador-orcamento-50-30-20-wrapper *::after {
    box-sizing: inherit;
}

/* Cabeçalho */
.so502020-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: var(--so502020-primary-gradient);
    border-radius: var(--so502020-border-radius-lg);
    color: white;
    box-shadow: var(--so502020-box-shadow-lg);
}

.so502020-titulo {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.so502020-descricao {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

.so502020-descricao strong {
    font-weight: 600;
    color: #fff;
}

/* Formulário */
.so502020-form-container {
    background: #FFFFFF;
    padding: 40px;
    border-radius: var(--so502020-border-radius-lg);
    box-shadow: var(--so502020-box-shadow);
    margin-bottom: 30px;
    border: 1px solid #e1e5e9;
}

.so502020-form-group {
    margin-bottom: 25px;
}

.so502020-form-label {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.so502020-form-label .so502020-icon-money::before {
    content: "💰";
    margin-right: 8px;
}

.so502020-input-wrapper {
    position: relative;
}

.so502020-form-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: 2px solid #e1e5e9;
    border-radius: var(--so502020-border-radius);
    transition: var(--so502020-transition);
    background: #f8f9fa;
}

.so502020-form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.so502020-form-input.so502020-error {
    border-color: var(--so502020-error-color);
    background: #fef2f2;
}

.so502020-form-input.so502020-success {
    border-color: var(--so502020-success-color);
    background: #f0fdf4;
}

.so502020-input-feedback {
    margin-top: 8px;
    font-size: 0.9rem;
    min-height: 20px;
}

.so502020-input-feedback.so502020-success {
    color: var(--so502020-success-color);
}

.so502020-input-feedback.so502020-error {
    color: var(--so502020-error-color);
}

/* Botões */
.so502020-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.so502020-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--so502020-border-radius);
    cursor: pointer;
    transition: var(--so502020-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: center;
}

.so502020-btn-primary {
    background: var(--so502020-primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.so502020-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.so502020-btn-secondary {
    background: var(--so502020-secondary-color);
    color: white;
}

.so502020-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.so502020-btn-cta {
    background: var(--so502020-primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.so502020-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6);
}

.so502020-btn-cta-secondary {
    background: var(--so502020-success-color);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.so502020-btn-cta-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.so502020-btn-export {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #111827;
    font-weight: 700;
}

.so502020-btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 112, 154, 0.6);
}

.so502020-btn-success {
    background: var(--so502020-success-color);
    color: white;
}

/* Ícones dos botões */
.so502020-icon-calculator::before { content: "🧮"; }
.so502020-icon-refresh::before { content: "🔄"; }
.so502020-icon-download::before { content: "📥"; }

/* Loading */
.so502020-loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: var(--so502020-border-radius-lg);
    box-shadow: var(--so502020-box-shadow);
    margin-bottom: 30px;
}

.so502020-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: so502020-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Resultados */
.so502020-resultados {
    animation: so502020-fadeInUp 0.6s ease-out;
}

@keyframes so502020-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Box Resumo */
.so502020-resultado-resumo {
    background: var(--so502020-primary-color);
    color: white;
    padding: 30px;
    border-radius: var(--so502020-border-radius-lg);
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--so502020-box-shadow-lg);
}

.so502020-resultado-resumo h3 {
    font-size: 1.8rem;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.so502020-resumo-renda {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.so502020-resumo-renda .so502020-valor {
    font-weight: 700;
    font-size: 1.4rem;
}

.so502020-resumo-confirmacao {
    font-size: 1rem;
    opacity: 0.9;
}

/* Gráfico */
.so502020-resultado-grafico {
    background: #FFFFFF;
    padding: 30px;
    border-radius: var(--so502020-border-radius-lg);
    box-shadow: var(--so502020-box-shadow);
    margin-bottom: 30px;
    text-align: center;
}

.so502020-resultado-grafico h4 {
    font-size: 1.5rem;
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-weight: 600;
}

.so502020-grafico-container {
    max-width: 400px;
    margin: 0 auto;
}

/* Tabela */
.so502020-resultado-tabela {
    background: #FFFFFF;
    padding: 30px;
    border-radius: var(--so502020-border-radius-lg);
    box-shadow: var(--so502020-box-shadow);
    margin-bottom: 30px;
}

.so502020-resultado-tabela h4 {
    font-size: 1.5rem;
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
}

.so502020-tabela-container {
    overflow-x: visible;
}

.so502020-tabela-orcamento {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.so502020-tabela-orcamento th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e1e5e9;
}

.so502020-tabela-orcamento td {
    padding: 15px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: middle;
}

.so502020-categoria-nome {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.so502020-categoria-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.so502020-necessidades-icon {
    background: #EF4444;
}

.so502020-desejos-icon {
    background: #3B82F6;
}

.so502020-investimentos-icon {
    background: #10B981;
}

.so502020-categoria-valor {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
}

.so502020-categoria-percentual {
    font-weight: 600;
    color: #667eea;
}

/* CTAs */
.so502020-resultado-ctas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.so502020-cta-investimentos,
.so502020-cta-dividas {
    background: #FFFFFF;
    padding: 25px;
    border-radius: var(--so502020-border-radius-lg);
    box-shadow: var(--so502020-box-shadow);
    text-align: center;
    border: 1px solid #e1e5e9;
}

.so502020-cta-investimentos h5,
.so502020-cta-dividas h5 {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    color: #2c3e50;
}

/* Estilo para os botões de CTA */
.so502020-cta-investimentos .so502020-btn-cta,
.so502020-cta-dividas .so502020-btn-cta-secondary,
#so502020-simulador-resultados > div.so502020-resultado-ctas > div.so502020-cta-investimentos > a,
#so502020-simulador-resultados > div.so502020-resultado-ctas > div.so502020-cta-dividas > a {
    color: #ffffff !important;
    background-color: #2ecc71 !important;
    border-color: #27ae60 !important;
}

.so502020-cta-investimentos p,
.so502020-cta-dividas p {
    margin: 0 0 20px 0;
    color: #666;
}

/* Exportação */
.so502020-resultado-exportacao {
    text-align: center;
    background: #FFFFFF;
    padding: 30px;
    border-radius: var(--so502020-border-radius-lg);
    box-shadow: var(--so502020-box-shadow);
    margin-bottom: 30px;
}

/* Conteúdo SEO */
.so502020-conteudo-seo {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid #e1e5e9;
}

.so502020-seo-section {
    margin-bottom: 40px;
}

.so502020-seo-section h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.so502020-conteudo-seo p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.so502020-seo-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.so502020-seo-categoria {
    background: white;
    padding: 25px;
    border-radius: var(--so502020-border-radius-lg);
    box-shadow: var(--so502020-box-shadow);
    border-left: 5px solid #667eea;
}

.so502020-seo-categoria h4 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.so502020-seo-categoria p {
    font-size: 1rem;
    line-height: 1.7;
    color: #666;
    margin: 0;
}

.so502020-seo-beneficios {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.so502020-seo-beneficios li {
    background: white;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: var(--so502020-border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid #667eea;
}

.so502020-seo-beneficios strong {
    color: #2c3e50;
}

/* Responsividade */
@media (max-width: 768px) {
    .simulador-orcamento-50-30-20-wrapper {
        padding: 15px;
    }
    
    .so502020-titulo {
        font-size: 2rem;
    }
    
    .so502020-form-container {
        padding: 25px;
    }
    
    .so502020-form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .so502020-btn {
        min-width: auto;
    }
    
    .so502020-resumo-renda {
        flex-direction: column;
        gap: 10px;
    }
    
    .so502020-resultado-ctas {
        grid-template-columns: 1fr;
    }
    
    .so502020-seo-categorias {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .so502020-titulo {
        font-size: 1.8rem;
    }
    
    .so502020-form-container {
        padding: 20px;
    }
    
    .so502020-resultado-resumo,
    .so502020-resultado-grafico,
    .so502020-resultado-tabela {
        padding: 20px;
    }
}



/* Tabela base */
.so502020-tabela-orcamento {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.so502020-tabela-orcamento th,
.so502020-tabela-orcamento td {
    padding: 15px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: middle;
}

/* Aplicar rolagem horizontal apenas em telas menores */
@media (max-width: 768px) {
    .so502020-tabela-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        border-radius: 10px;
        position: relative;
        padding-bottom: 30px; /* Espaço para o indicador de deslize */
    }

    .so502020-tabela-orcamento {
        min-width: 720px; /* Garante que a tabela tenha largura suficiente para rolar */
    }

    /* Colunas com largura mínima para evitar quebra caótica */
    .so502020-tabela-orcamento th:nth-child(1), .so502020-tabela-orcamento td:nth-child(1) { min-width: 160px; }
    .so502020-tabela-orcamento th:nth-child(2), .so502020-tabela-orcamento td:nth-child(2) { min-width: 100px; white-space: nowrap; }
    .so502020-tabela-orcamento th:nth-child(3), .so502020-tabela-orcamento td:nth-child(3) { min-width: 140px; white-space: nowrap; }
    .so502020-tabela-orcamento th:nth-child(4), .so502020-tabela-orcamento td:nth-child(4) { min-width: 250px; }

    /* Indicador visual de deslizamento */
    .so502020-tabela-container::after {
        content: "← Deslize para ver mais →";
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 12px;
        color: #667eea;
        font-weight: 500;
        opacity: 0.8;
        pointer-events: none;
        display: block; /* Garante que o indicador apareça no mobile */
        animation: so502020-pulse 2s ease-in-out infinite;
        background: rgba(102, 126, 234, 0.1);
        padding: 5px 15px;
        border-radius: 15px;
        border: 1px solid rgba(102, 126, 234, 0.2);
    }

    @keyframes so502020-pulse {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 1; }
    }
}

/* Remover o wrapper de rolagem original */
.tabela-scroll {
    overflow-x: visible; /* Garante que não haja rolagem horizontal no desktop */
    overflow-y: visible; /* Remove rolagem vertical */
    -webkit-overflow-scrolling: auto;
    scroll-snap-type: none;
    border-radius: 0;
    position: static;
    background: none;
    background-size: auto;
    background-attachment: scroll;
    margin-bottom: 0;
}

.tabela-scroll::after {
    display: none; /* Esconde o indicador no desktop */
}

/* Remover sombra interna que indicava scroll no desktop */
.tabela-scroll::before {
    display: none;
}

/* Remover o indicador de posição do scroll global */
.so502020-tabela-container::after {
    display: none;
}

/* Ajustes para telas muito pequenas */
@media (max-width: 480px) {
    .so502020-tabela-orcamento {
        min-width: 600px; 
    }
    .so502020-tabela-orcamento th:nth-child(1), .so502020-tabela-orcamento td:nth-child(1) { min-width: 140px; }
    .so502020-tabela-orcamento th:nth-child(2), .so502020-tabela-orcamento td:nth-child(2) { min-width: 90px; }
    .so502020-tabela-orcamento th:nth-child(3), .so502020-tabela-orcamento td:nth-child(3) { min-width: 120px; }
    .so502020-tabela-orcamento th:nth-child(4), .so502020-tabela-orcamento td:nth-child(4) { min-width: 200px; }

    .so502020-tabela-container::after {
        font-size: 10px;
        padding: 3px 10px;
    }
}

/* Estilo da bolinha */
.dot{display:inline-block;width:12px;height:12px;border-radius:50%}
.dot-red{background:#F44336}.dot-blue{background:#2196F3}.dot-green{background:#10B981}






/* Otimização do layout dos textos em linha */

/* Categoria com ícone e texto alinhados */
.so502020-categoria-nome {
  display: flex !important;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: fit-content;
}

.so502020-categoria-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

/* Percentual sempre em uma linha */
.so502020-categoria-percentual {
  white-space: nowrap;
  font-weight: 600;
  text-align: center;
}

/* Valor monetário sempre em uma linha */
.so502020-categoria-valor {
  white-space: nowrap;
  font-weight: 700;
  text-align: right;
  font-family: 'Courier New', monospace;
}

/* Descrição com quebra inteligente */
.so502020-categoria-descricao {
  line-height: 1.4;
  word-wrap: break-word;
  hyphens: auto;
}

/* Melhorias específicas para mobile */
@media (max-width: 768px) {
  /* Textos menores mas legíveis */
  .tabela-scroll th, .tabela-scroll td {
    font-size: 13px;
    line-height: 1.3;
  }
  
  /* Categoria mais compacta */
  .so502020-categoria-nome {
    gap: 6px;
    font-size: 12px;
  }
  
  .so502020-categoria-icon {
    width: 14px;
    height: 14px;
  }
  
  /* Percentual destacado */
  .so502020-categoria-percentual {
    font-size: 13px;
    font-weight: 700;
    color: #667eea;
  }
  
  /* Valor com destaque */
  .so502020-categoria-valor {
    font-size: 13px;
    color: #2c3e50;
  }
  
  /* Descrição mais compacta */
  .so502020-categoria-descricao {
    font-size: 11px;
    line-height: 1.3;
    max-width: 250px;
  }
}

@media (max-width: 480px) {
  /* Ajustes para telas muito pequenas */
  .tabela-scroll th, .tabela-scroll td {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .so502020-categoria-nome {
    font-size: 11px;
    gap: 4px;
  }
  
  .so502020-categoria-icon {
    width: 12px;
    height: 12px;
  }
  
  .so502020-categoria-percentual,
  .so502020-categoria-valor {
    font-size: 12px;
  }
  
  .so502020-categoria-descricao {
    font-size: 10px;
    max-width: 200px;
  }
}

/* Cabeçalhos da tabela otimizados */
.so502020-tabela-orcamento th {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #2c3e50;
  border-bottom: 2px solid #667eea;
}

@media (max-width: 768px) {
  .so502020-tabela-orcamento th {
    font-size: 12px;
    padding: 10px 8px;
  }
}

/* Alinhamento consistente das colunas */
.so502020-tabela-orcamento th:nth-child(1),
.so502020-tabela-orcamento td:nth-child(1) {
  text-align: left;
}

.so502020-tabela-orcamento th:nth-child(2),
.so502020-tabela-orcamento td:nth-child(2) {
  text-align: center;
}

.so502020-tabela-orcamento th:nth-child(3),
.so502020-tabela-orcamento td:nth-child(3) {
  text-align: right;
}

.so502020-tabela-orcamento th:nth-child(4),
.so502020-tabela-orcamento td:nth-child(4) {
  text-align: left;
}

/* Hover effect para melhor UX */
.so502020-tabela-orcamento tbody tr:hover {
  background-color: rgba(102, 126, 234, 0.05);
  transform: translateX(2px);
  transition: all 0.2s ease;
}

/* Bordas mais suaves */
.so502020-tabela-orcamento td {
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.so502020-tabela-orcamento tbody tr:last-child td {
  border-bottom: 1px solid #e1e5e9;
}

