/* Componentes adicionais para o Simulador de Impostos */

/* Tooltips informativos */
.info-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.info-tooltip i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.info-tooltip .tooltip-content {
    visibility: hidden;
    width: 250px;
    background-color: rgba(17, 24, 39, 0.95);
    color: white;
    text-align: left;
    border-radius: var(--border-radius-md);
    padding: 12px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: var(--card-shadow);
    font-size: 0.85rem;
    line-height: 1.5;
}

.info-tooltip .tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(17, 24, 39, 0.95) transparent transparent transparent;
}

.info-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Badges e etiquetas */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: var(--primary-gradient);
    color: white;
}

.badge-success {
    background: var(--success-gradient);
    color: white;
}

.badge-warning {
    background: var(--warning-gradient);
    color: white;
}

.badge-info {
    background: var(--secondary-gradient);
    color: white;
}

/* Cards informativos */
.info-card {
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.info-card-primary {
    background-color: rgba(99, 102, 241, 0.1);
}

.info-card-primary::before {
    background-color: #6366F1;
}

.info-card-success {
    background-color: rgba(16, 185, 129, 0.1);
}

.info-card-success::before {
    background-color: #10B981;
}

.info-card-warning {
    background-color: rgba(245, 158, 11, 0.1);
}

.info-card-warning::before {
    background-color: #F59E0B;
}

.info-card-info {
    background-color: rgba(14, 165, 233, 0.1);
}

.info-card-info::before {
    background-color: #0EA5E9;
}

/* Gráficos e visualizações */
.chart-container {
    width: 100%;
    height: 300px;
    margin: 20px 0;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    background-color: white;
    box-shadow: var(--card-shadow);
}

/* Comparação visual de valores */
.comparison-bar {
    height: 30px;
    border-radius: var(--border-radius-full);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    background-color: #F3F4F6;
}

.comparison-bar-fill {
    height: 100%;
    border-radius: var(--border-radius-full);
    transition: width 1s ease;
}

.comparison-bar-simples {
    background: var(--success-gradient);
}

.comparison-bar-lucro {
    background: var(--warning-gradient);
}

.comparison-bar-irpf {
    background: var(--primary-gradient);
}

.comparison-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.comparison-value {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Tabela de comparação */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.comparison-table th {
    background-color: #F9FAFB;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #E5E7EB;
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #E5E7EB;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background-color: #F9FAFB;
}

.comparison-table tr:hover {
    background-color: #F3F4F6;
}

/* Loader e estados de carregamento */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid #F3F4F6;
    border-radius: 50%;
    border-top: 3px solid #6366F1;
    animation: spin 1s linear infinite;
}

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

/* Botões com ícones */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: white;
    border: 1px solid #E5E7EB;
    color: #6B7280;
    transition: all 0.3s ease;
    cursor: pointer;
}

.icon-button:hover {
    background-color: #F9FAFB;
    color: #4F46E5;
    transform: translateY(-2px);
    box-shadow: var(--button-shadow);
}

/* Switches e toggles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E5E7EB;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--primary-gradient);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Notificações e alertas */
.notification {
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.notification i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.notification-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10B981;
    color: #065F46;
}

.notification-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #F59E0B;
    color: #92400E;
}

.notification-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #EF4444;
    color: #B91C1C;
}

.notification-info {
    background-color: rgba(14, 165, 233, 0.1);
    border-left: 4px solid #0EA5E9;
    color: #0369A1;
}

/* Dicas e sugestões */
.tip-box {
    padding: 15px;
    border-radius: var(--border-radius-md);
    margin: 20px 0;
    background-color: rgba(14, 165, 233, 0.1);
    border-left: 4px solid #0EA5E9;
    position: relative;
}

.tip-box i {
    color: #0EA5E9;
    margin-right: 10px;
}

.tip-title {
    font-weight: 600;
    color: #0369A1;
    margin-bottom: 5px;
}

.tip-content {
    color: #0369A1;
    font-size: 0.9rem;
}

/* Estilos para dispositivos móveis */
@media (max-width: 768px) {
    .info-tooltip .tooltip-content {
        width: 200px;
    }
    
    .comparison-label, .comparison-value {
        font-size: 0.75rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .info-tooltip .tooltip-content {
        width: 180px;
    }
    
    .comparison-table th, .comparison-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

.disclaimer-aliquota {
    font-size: 0.8rem;
    color: #666;
    margin-top: -5px;
    margin-bottom: 10px;
    font-style: italic;
}
