/* Estilos para Calculadoras de Licitaciones Públicas */

.calc-licitaciones {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.calc-licitaciones h3 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 10px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.calc-descripcion {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 25px;
    font-style: italic;
}

.calc-form {
    margin-bottom: 30px;
}

.calc-form h4 {
    color: #34495e;
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #3498db;
}

.calc-campo {
    margin-bottom: 20px;
}

.calc-campo label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.calc-campo input[type="number"],
.calc-campo input[type="text"],
.calc-campo select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #dce4ec;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.calc-campo input[type="number"]:focus,
.calc-campo input[type="text"]:focus,
.calc-campo select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.calc-campo small {
    display: block;
    color: #95a5a6;
    font-size: 12px;
    margin-top: 5px;
}

.calc-boton,
.calc-boton-reset {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
    margin-top: 10px;
}

.calc-boton:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

.calc-boton-reset {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.calc-boton-reset:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #636e72 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(127, 140, 141, 0.3);
}

.calc-resultados {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
    border-left: 5px solid #27ae60;
}

.calc-resultados h4 {
    color: #27ae60;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}

.resultado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.resultado-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.resultado-item span {
    color: #34495e;
    font-size: 15px;
}

.resultado-item strong {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 700;
}

.resultado-item.destacado {
    background: #e8f5e9;
    border-left: 4px solid #27ae60;
}

.resultado-item.destacado strong {
    color: #27ae60;
    font-size: 20px;
}

.resultado-item.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.resultado-item.total span,
.resultado-item.total strong {
    color: white;
}

.calc-aviso {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

.ranking-container {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.ranking-container h5 {
    color: #34495e;
    margin-bottom: 15px;
    font-size: 16px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    background: #e9ecef;
}

.ranking-posicion {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.ranking-item.tu-oferta {
    background: #d4edda;
    border: 2px solid #28a745;
}

.ranking-item.tu-oferta .ranking-posicion {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.escenario-resultado {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #9b59b6;
}

.escenario-resultado h5 {
    color: #9b59b6;
    margin-bottom: 15px;
}

.tabla-penalizaciones {
    margin-top: 25px;
    overflow-x: auto;
}

.tabla-penalizaciones table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.tabla-penalizaciones th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.tabla-penalizaciones td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.tabla-penalizaciones tr:hover {
    background: #f8f9fa;
}

.recomendacion {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.7;
}

.recomendacion.positiva {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.recomendacion.negativa {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.recomendacion.neutral {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

.recomendacion strong {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
}

.grafico-rentabilidad {
    margin-top: 25px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .calc-licitaciones {
        padding: 20px;
    }
    
    .calc-licitaciones h3 {
        font-size: 20px;
    }
    
    .calc-boton,
    .calc-boton-reset {
        width: 100%;
        margin-right: 0;
    }
    
    .resultado-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .resultado-item strong {
        margin-top: 8px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calc-resultados {
    animation: fadeIn 0.5s ease;
}

/* Estados de validación */
.calc-campo input.error {
    border-color: #e74c3c;
}

.calc-campo input.success {
    border-color: #27ae60;
}

.mensaje-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.mensaje-error.visible {
    display: block;
}
