/* Mobile Tabs Enhancement - Melhor Distinção Visual */

/* Estrutura dos botões de aba melhorada */
.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    position: relative;
}

.tab-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tab-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.tab-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.tab-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 400;
    margin-top: 2px;
}

/* Estados das abas */
.tab-btn:not(.active) .tab-icon {
    background: rgba(108, 92, 231, 0.1);
    color: #6c5ce7;
}

.tab-btn.active .tab-icon {
    background: #6c5ce7;
    color: white;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.tab-btn.active .tab-title {
    color: #6c5ce7;
    font-weight: 700;
}

.tab-btn.active .tab-subtitle {
    color: #6c5ce7;
    opacity: 0.8;
}

/* Cabeçalhos explicativos das abas */
.tab-explanation {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    border: 2px solid #e3ebff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.tab-explanation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6c5ce7, #a29bfe);
}

.explanation-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.explanation-text {
    flex: 1;
}

.explanation-text h3 {
    margin: 0 0 4px 0;
    color: #2d3436;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.explanation-text p {
    margin: 0;
    color: #636e72;
    font-size: 0.85rem;
    line-height: 1.4;
}

.explanation-text strong {
    color: #6c5ce7;
    font-weight: 600;
}

/* Indicador visual de aba ativa no conteúdo */
.tab-content {
    position: relative;
}

.tab-content.active {
    animation: fadeInSlide 0.3s ease-out;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias específicas para mobile */
@media (max-width: 768px) {
    .tabs {
        padding: 0 16px;
        gap: 8px;
        position: relative;
    }
    
    .tab-btn {
        padding: 14px 12px;
        border-radius: 12px;
        min-height: 60px;
        position: relative;
    }
    
    .tab-title {
        font-size: 0.85rem;
    }
    
    .tab-subtitle {
        font-size: 0.7rem;
    }
    
    .tab-explanation {
        margin: 0 16px 24px 16px;
        padding: 14px;
        border-radius: 10px;
    }
    
    .explanation-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .explanation-text h3 {
        font-size: 0.9rem;
    }
    
    .explanation-text p {
        font-size: 0.8rem;
    }
    
    /* Indicador visual extra no mobile */
    .tab-btn.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 3px;
        background: #6c5ce7;
        border-radius: 2px;
    }
    
    /* Badge indicativo no mobile */
    .tab-btn.active::before {
        content: 'ATIVO';
        position: absolute;
        top: 4px;
        right: 6px;
        background: #6c5ce7;
        color: white;
        font-size: 0.6rem;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 8px;
        line-height: 1;
        letter-spacing: 0.5px;
        opacity: 0.9;
    }
    
    /* Container com borda colorida para aba ativa */
    .tab-content.active {
        border-top: 4px solid #6c5ce7;
        background: rgba(108, 92, 231, 0.02);
        border-radius: 0 0 16px 16px;
        margin-top: -2px;
        padding-top: 20px;
    }
    
    /* Breadcrumb indicativo no topo do conteúdo */
    .tab-content.active::before {
        content: attr(data-tab-name);
        display: block;
        background: linear-gradient(135deg, #6c5ce7, #a29bfe);
        color: white;
        font-size: 0.7rem;
        font-weight: 600;
        padding: 6px 12px;
        margin: -20px -16px 16px -16px;
        text-align: center;
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }
}

/* Estados de hover para desktop */
@media (min-width: 769px) {
    .tab-btn:hover:not(.active) {
        background: rgba(108, 92, 231, 0.05);
    }
    
    .tab-btn:hover:not(.active) .tab-icon {
        background: rgba(108, 92, 231, 0.15);
        transform: scale(1.05);
    }
    
    .tab-explanation:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(108, 92, 231, 0.1);
    }
}

/* Indicadores de estado para diferentes tipos de lucro - AMBAS VERDES */
.tab-content[id="lucro-fixo"] .tab-explanation {
    border-color: #00b894;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f8f0 100%);
}

.tab-content[id="lucro-fixo"] .tab-explanation::before {
    background: linear-gradient(90deg, #00b894, #55a3ff);
}

.tab-content[id="lucro-fixo"] .explanation-icon {
    background: linear-gradient(135deg, #00b894, #55a3ff);
}

.tab-content[id="lucro-percentual-tab"] .tab-explanation {
    border-color: #00b894;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f8f0 100%);
}

.tab-content[id="lucro-percentual-tab"] .tab-explanation::before {
    background: linear-gradient(90deg, #00b894, #55a3ff);
}

.tab-content[id="lucro-percentual-tab"] .explanation-icon {
    background: linear-gradient(135deg, #00b894, #55a3ff);
}

/* Cabeçalho dos resultados com indicador de modo */
.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.result-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.result-icon.fixed-mode {
    background: linear-gradient(135deg, #00b894, #55a3ff);
}

.result-icon.percentage-mode {
    background: linear-gradient(135deg, #00b894, #55a3ff);
}

.result-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.result-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3436;
    line-height: 1.2;
    margin: 0;
}

.result-mode {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.7;
    margin-top: 2px;
    color: #636e72;
}

/* Ocultar seções de debug */
.hidden-debug {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .result-header {
        gap: 10px;
    }
    
    .result-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .result-title {
        font-size: 1rem;
    }
    
    .result-mode {
        font-size: 0.7rem;
    }
}
