/**
 * Estilos da Calculadora de Renda Per Capita
 * @package Calculadora_RPC
 * @since 1.0.0
 */

/* Container principal */
.rpc-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

/* Título */
.rpc-titulo {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

/* Formulário */
.rpc-form {
    margin-bottom: 30px;
}

/* Grupos de campos */
.rpc-campo-grupo {
    margin-bottom: 25px;
}

.rpc-rendas-container {
    margin-bottom: 25px;
}

/* Labels */
.rpc-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 16px;
}

.rpc-obrigatorio {
    color: #e74c3c;
    margin-left: 3px;
}

/* Inputs */
.rpc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.rpc-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.rpc-input:invalid {
    border-color: #e74c3c;
}

.rpc-input-number {
    max-width: 200px;
}

/* Lista de rendas */
.rpc-rendas-lista {
    margin-bottom: 15px;
}

.rpc-renda-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.rpc-renda-item .rpc-input {
    flex: 1;
}

/* Botões */
.rpc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1;
}

.rpc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rpc-btn:active {
    transform: translateY(0);
}

.rpc-btn-calcular {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-size: 18px;
    padding: 15px 30px;
    margin-right: 10px;
}

.rpc-btn-calcular:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
}

.rpc-btn-limpar {
    background: #95a5a6;
    color: white;
}

.rpc-btn-limpar:hover {
    background: #7f8c8d;
}

.rpc-btn-adicionar {
    background: #27ae60;
    color: white;
    width: 100%;
}

.rpc-btn-adicionar:hover {
    background: #229954;
}

.rpc-btn-remover {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    min-width: 80px;
}

.rpc-btn-remover:hover {
    background: #c0392b;
}

/* Ações */
.rpc-acoes {
    text-align: center;
    margin-top: 30px;
}

/* Resultado */
.rpc-resultado {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #27ae60;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    text-align: center;
    display: none;
}

.rpc-resultado.show {
    display: block;
    animation: slideIn 0.5s ease-out;
}

.rpc-resultado-titulo {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 20px;
}

.rpc-resultado-valor {
    font-size: 36px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.rpc-resultado-detalhes {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rpc-resultado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.rpc-resultado-item:last-child {
    border-bottom: none;
}

.rpc-resultado-label {
    font-weight: 600;
    color: #34495e;
}

.rpc-resultado-value {
    font-weight: 700;
    color: #2c3e50;
}

/* Loading */
.rpc-loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    font-style: italic;
}

.rpc-loading span {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Descrições */
.rpc-descricao {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

/* Mensagens de erro */
.rpc-erro {
    background: #fdf2f2;
    border: 2px solid #e74c3c;
    color: #c0392b;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

/* Animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .rpc-container {
        margin: 10px;
        padding: 20px;
    }
    
    .rpc-titulo {
        font-size: 24px;
    }
    
    .rpc-renda-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .rpc-renda-item .rpc-input {
        width: 100%;
    }
    
    .rpc-btn-remover {
        width: 100%;
    }
    
    .rpc-acoes {
        flex-direction: column;
        gap: 10px;
    }
    
    .rpc-btn-calcular {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .rpc-btn-limpar {
        width: 100%;
    }
    
    .rpc-resultado-valor {
        font-size: 28px;
    }
    
    .rpc-resultado-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .rpc-container {
        padding: 15px;
    }
    
    .rpc-titulo {
        font-size: 20px;
    }
    
    .rpc-input {
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .rpc-resultado-valor {
        font-size: 24px;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .rpc-btn:hover {
        transform: none;
    }
    
    .rpc-resultado.show {
        animation: none;
    }
    
    .rpc-loading span {
        animation: none;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .rpc-container {
        border: 2px solid #000;
    }
    
    .rpc-input {
        border-color: #000;
    }
    
    .rpc-btn {
        border: 2px solid #000;
    }
}



/* Estilo geral da caixa de feedback */
.rpc-feedback-container {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    font-weight: normal;
    line-height: 1.6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Estilo para feedback positivo (renda elegível) */
.rpc-feedback-positivo {
    color: #155724;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    padding: 20px;
    border-radius: 12px;
}

.rpc-feedback-positivo h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 700;
    color: #155724;
}

.rpc-feedback-positivo h5 {
    margin: 15px 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #155724;
}

/* Estilo para feedback negativo (renda não elegível) */
.rpc-feedback-negativo {
    color: #721c24;
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 2px solid #dc3545;
    padding: 20px;
    border-radius: 12px;
}

.rpc-feedback-negativo h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 700;
    color: #721c24;
}

.rpc-feedback-negativo h5 {
    margin: 15px 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #721c24;
}

/* Estilo para a área de informações adicionais */
.rpc-feedback-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid currentColor;
}

.rpc-feedback-info ul {
    margin: 10px 0;
    padding-left: 20px;
}

.rpc-feedback-info li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.rpc-feedback-info p {
    margin: 10px 0;
}

/* Responsividade para feedback */
@media (max-width: 768px) {
    .rpc-feedback-container {
        padding: 15px;
        margin-top: 15px;
    }
    
    .rpc-feedback-positivo,
    .rpc-feedback-negativo {
        padding: 15px;
    }
    
    .rpc-feedback-positivo h4,
    .rpc-feedback-negativo h4 {
        font-size: 18px;
    }
    
    .rpc-feedback-info {
        padding: 12px;
    }
}

